Casts
functions
cast-string
@function cast-string($value) { ... }
Description
Casts a value to a string
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$value
|
Some value |
Mixed
|
— none |
Returns
String
Requires
Used by
-
[function]
cast-number -
[function]
aeq -
[function]
aeq -
[function]
color -
[function]
range-alpha -
[function]
range-alpha-min-max -
[function]
stringify -
[function]
unstringify -
[function]
sort -
[function]
is-NaN -
[mixin]
test -
[mixin]
compare
cast-boolean
(aliased as
cast-bool
)
@function cast-boolean($value) { ... }
Description
Casts a value to a boolean
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$value
|
Some value |
Mixed
|
— none |
Returns
Boolean
Requires
-
[function]
is-boolean -
[function]
is-number -
[function]
is-NaN -
[function]
contains
Used by
-
[function]
cast-bool
cast-bool
(alias for cast-boolean)
@function cast-bool($value) { ... }
Refer to cast-boolean.
cast-list
@function cast-list($values, $separator: space) { ... }
Description
Casts values to a list
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$values
|
Some values |
Mixed
|
— none |
$separator
|
The preferred list separator passed in as the last argument, either |
String
|
|
Returns
List
Requires
Used by
-
[function]
count
cast-map
@function cast-map($pairs) { ... }
Description
Casts values to a map
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$pairs
|
Some key-value pairs, expected as either a |
Mixed
|
— none |
Returns
Map
Requires
cast-number
@function cast-number() { ... }
Description
Casts values to a number
Parameters
None.
Returns
Number or Null
Throws
'Cannot
cast-numberfor invalid character#{$characters}.''Cannot
cast-numberfor invalid units#{$unit}.'
Requires
-
[function]
is-number -
[function]
is-string -
[function]
cast-string -
[function]
char-at -
[function]
str-is-unit -
[function]
str-is-number -
[function]
unit-to-digit -
[function]
is-negative -
[variable]
brandy-numbers
Used by
-
[function]
range-min-max -
[function]
range-min-max -
[function]
sum -
[function]
avg -
[function]
unitless-rad -
[function]
convert-unit -
[function]
strip-unit -
[function]
is-zero -
[function]
extract-unit -
[function]
is-percentage -
[function]
is-even -
[function]
is-odd -
[function]
is-integer -
[function]
is-float -
[function]
is-angle -
[function]
is-frequency -
[function]
is-relative-length -
[function]
is-absolute-length -
[function]
is-resolution -
[function]
is-time -
[function]
inverse -
[function]
px -
[function]
pt -
[function]
pc -
[function]
in -
[function]
mm -
[function]
cm -
[function]
deg -
[function]
rad -
[function]
grad -
[function]
turn -
[function]
dpi -
[function]
dpcm -
[function]
dppx -
[function]
ms -
[function]
s -
[function]
hz -
[function]
khz -
[function]
rem -
[function]
em -
[function]
ex -
[function]
ch -
[function]
vw -
[function]
vh -
[function]
vmin -
[function]
vmax -
[function]
decimal-round -
[function]
decimal-ceil -
[function]
decimal-floor -
[function]
ratio -
[function]
fraction -
[function]
fraction
Author
Hugo Giraudel
Colors
functions
brightness
@function brightness($color) { ... }
Description
Calculates the brightness of a color
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$color
|
Some color |
Color
|
— none |
Returns
Number
Throws
Cannot get
brightnesson non-color#{$color}.
Requires
-
[function]
is-color
Author
Brendan Saunders
luminance
@function luminance($color) { ... }
Description
Calculates the luminance of a color
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$color
|
Some color |
Color
|
— none |
Returns
Number
Throws
Cannot get
luminanceon non-color#{$color}.
Requires
Used by
-
[function]
contrast-ratio
Author
Pelle Wessman
contrast-ratio
@function contrast-ratio($color1, $color2) { ... }
Description
Calculates the contrast ratio between two colors
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$color1
|
The first color to compare |
Color
|
— none |
$color2
|
The second color to compate |
Color
|
— none |
Returns
Number
Throws
Function
contrast-ratioexpects a color for argument$color1but#{type-of($color1)}was given.Function
contrast-ratioexpects a color for argument$color2but#{type-of($color2)}was given.
Requires
Used by
-
[function]
color-contrast -
[function]
color-contrast -
[function]
color-contrast -
[function]
color-contrast
Author
Mike Reithmuller
color-contrast
@function color-contrast($color, $dark: $brandy-dark-text, $light: $brandy-light-text) { ... }
Description
Attempts to return a color that best contrasts the input $color
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$color
|
Some color to contrast against |
Color
|
— none |
$dark
|
The dark color to be returned when contrasting against light colors |
Color
|
|
$light
|
The light color to be returned when contrasting against dark colors |
Color
|
|
Returns
Color
Throws
Function
color-contrastexpects a color for argument$colorbut#{type-of($color)}was given.Function
color-contrastexpects a color for argument$darkbut#{type-of($dark)}was given.Function
color-contrastexpects a color for argument$lightbut#{type-of($light)}was given.
Requires
-
[function]
contrast-ratio -
[function]
contrast-ratio -
[function]
contrast-ratio -
[function]
contrast-ratio -
[function]
is-color -
[variable]
brandy-dark-text -
[variable]
brandy-light-text -
[variable]
brandy-bg-contrast
Used by
-
[mixin]
expand-properties
Author
Mike Reithmuller
to-hex
@function to-hex($color) { ... }
Description
Outputs the HEX value of the color given
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$color
|
Some color |
Color
|
— none |
Returns
Color
— In the form rrggbb
Throws
Cannot execute
to-hexon non-color#{$color}
Requires
-
[function]
is-color
to-rgb
@function to-rgb($color) { ... }
Description
Outputs the RGB value of the color given
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$color
|
Some color |
Color
|
— none |
Returns
List
— In the form (r, g, b)
Throws
Cannot execute
to-rgbon non-color#{$color}
Requires
-
[function]
is-color
to-hsv
(aliased as
to-hsb
)
@function to-hsv($color) { ... }
Description
Outputs the HSV value of the color given
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$color
|
Some color |
Color
|
— none |
Returns
List
— In the form (h, s, v)
Throws
Cannot execute
to-hsvon non-color#{$color}
Requires
-
[function]
is-color -
[function]
const -
[variable]
brandy-const-map
Used by
-
[function]
to-hsb
to-hsb
(alias for to-hsv)
@function to-hsb($color) { ... }
Refer to to-hsv.
to-hsl
@function to-hsl($color) { ... }
Description
Outputs the HSL values of the color given
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$color
|
Some color |
Color
|
— none |
Returns
List
— In the form (h, s, l)
Throws
Cannot execute
to-hslon non-color#{$color}
Requires
-
[function]
is-color
cmyk
@function cmyk($c, $m, $y, $k: 0) { ... }
Description
Returns a valid color given CMYK values
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$c
|
A number representing a percentage of cyan |
Number
|
— none |
$m
|
A number representing a percentage of magenta |
Number
|
— none |
$y
|
A number representing a percentage of yellow |
Number
|
— none |
$k
|
A number representing a percentage of black |
Number
|
|
Returns
Color
Throws
Function
cmykexpects a number for argument$cbut#{type-of($c)}was given.Function
cmykexpects a unitless whole number or percentage for argument$c.Function
cmykexpects a number for argument$mbut#{type-of($m)}was given.Function
cmykexpects a unitless whole number or percentage for argument$m.Function
cmykexpects a number for argument$ybut#{type-of($y)}was given.Function
cmykexpects a unitless whole number or percentage for argument$y.Function
cmykexpects a number for argument$kbut#{type-of($k)}was given.Function
cmykexpects a unitless whole number or percentage for argument$k.
Requires
-
[function]
is-percentage -
[function]
is-percentage -
[function]
is-percentage -
[function]
is-percentage -
[function]
is-number -
[function]
is-float
hsv
(aliased as
hsb
)
@function hsv($h, $s, $v) { ... }
Description
Returns a valid color given HSV values
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$h
|
A number representing hue, with or without units |
Number
|
— none |
$s
|
A number representing saturation, with or without units |
Number
|
— none |
$v
|
A number representing brightness, with or without units |
Number
|
— none |
Returns
Color
Throws
Function
hsvexpects a number for argument$hbut#{type-of($h)}was given.Function
hsvexpects a number for argument$sbut#{type-of($s)}was given.Function
hsvexpects a number for argument$vbut#{type-of($v)}was given.
Requires
-
[function]
is-number -
[function]
const -
[variable]
brandy-const-map
Used by
-
[function]
hsb
hsb
(alias for hsv)
@function hsb($h, $s, $b) { ... }
Refer to hsv.
tint
@function tint($color, $percent) { ... }
Description
Returns the color mixed with white to create the desired tint amount
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$color
|
Some color to be tinted |
Color
|
— none |
$percent
|
The percentage amount of tint to be applied |
Number
|
— none |
Returns
Color
Throws
Cannot execute
tinton non-color#{$color}Function
tintexpects a percentage for argument$percentbut#{$percent}was given.
Requires
-
[function]
is-percent -
[function]
is-color -
[function]
is-percentage
Used by
-
[function]
color-tints
Author
Hugo Giraudel
shade
@function shade($color, $percent) { ... }
Description
Returns the color mixed with black to create the desired shade amount
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$color
|
Some color to be shaded |
Color
|
— none |
$percent
|
The percentage amount of shade to be applied |
Number
|
— none |
Returns
Color
Throws
Cannot execute
shadeon non-color#{$color}Function
shadeexpects a percentage for argument$percentbut#{$percent}was given.
Requires
-
[function]
is-percent -
[function]
is-color -
[function]
is-percentage
Used by
-
[function]
color-shades
Author
Hugo Giraudel
tone
@function tone($color, $percent) { ... }
Description
Returns the color mixed with gray to create the desired tone amount
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$color
|
Some color to be shaded |
Color
|
— none |
$percent
|
The percentage amount of shade to be applied |
Number
|
— none |
Returns
Color
Throws
Cannot execute
toneon non-color#{$color}Function
toneexpects a percentage for argument$percentbut#{$percent}was given.
Requires
-
[function]
is-percent -
[function]
is-color -
[function]
is-percentage
Used by
-
[function]
color-tones
random-color
@function random-color() { ... }
Description
Generates a random color
Parameters
None.
Returns
Color
color-complementary
@function color-complementary($color) { ... }
Description
Gets the complementary color of a given color
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$color
|
Some color |
Color
|
— none |
Returns
Color
Throws
Cannot execute
color-complementaryon non-color#{$color}
Requires
-
[function]
is-color
Used by
-
[function]
color-split-complementary -
[function]
color-rectangle -
[function]
color-square
color-triad
@function color-triad($color) { ... }
Description
Gets the triad colors of a given color
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$color
|
Some color |
Color
|
— none |
Returns
List
— A list of colors, where the first color is $color
Throws
Cannot execute
color-triadon non-color#{$color}
Requires
-
[function]
is-color
color-analogous
@function color-analogous($color) { ... }
Description
Gets the analogous colors of a given color
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$color
|
Some color |
Color
|
— none |
Returns
List
— A list of colors, where the first color is $color
Throws
Cannot execute
color-analogouson non-color#{$color}
Requires
-
[function]
is-color
Used by
-
[function]
color-split-complementary
color-split-complementary
@function color-split-complementary($color) { ... }
Description
Gets the split complementary colors of a given color
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$color
|
Some color |
Color
|
— none |
Returns
List
— A list of colors, where the first color is $color
Throws
Cannot execute
color-split-complementaryon non-color#{$color}
Requires
-
[function]
is-color -
[function]
color-complementary -
[function]
color-analogous
color-rectangle
@function color-rectangle($color) { ... }
Description
Gets the rectangle colors of a given color
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$color
|
Some color |
Color
|
— none |
Returns
List
— A list of colors, where the first color is $color
Throws
Cannot execute
color-rectangleon non-color#{$color}
Requires
-
[function]
is-color -
[function]
color-complementary
color-square
@function color-square($color) { ... }
Description
Gets the square colors of a given color
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$color
|
Some color |
Color
|
— none |
Returns
List
— A list of colors, where the first color is $color
Throws
Cannot execute
color-squareon non-color#{$color}
Requires
-
[function]
is-color -
[function]
color-complementary
color-stops
@function color-stops($color1, $color2, $x: 0) { ... }
Description
Gets $x number of colors between the two given colors
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$color1
|
The first color to use |
Color
|
— none |
$color2
|
The second color to use |
Color
|
— none |
$x
|
The desired number of stops to produce |
Number
|
|
Returns
List
— A list of colors, where the first color is $color1 and last color is $color2
Throws
Function
color-stopsexpects a color for argument$color1but#{type-of($color1)}was given.Function
color-stopsexpects a color for argument$color2but#{type-of($color2)}was given.Function
color-stopsexpects a number for argument$xbut#{type-of($x)}was given.Function
color-stopsexpects a positive integer for argument$xbut#{$x}was given.
Requires
color-tints
@function color-tints($color, $x: 0, $min: 0%, $max: 100%) { ... }
Description
Gets $x number of tints between the given $min and $max tint percentages
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$color
|
Some color |
Color
|
— none |
$x
|
The desired number of tints to produce |
Number
|
|
$min
|
The minimum tint percentage to use |
Number
|
|
$max
|
The maximum tint percentage to use |
Number
|
|
Returns
List
— A list of colors, where the first color is $color and last color is white if default $min and $max are used
Throws
Function
color-tintsexpects a color for argument$colorbut#{type-of($color)}was given.Function
color-tintsexpects a number for argument$xbut#{type-of($x)}was given.Function
color-tintsexpects a percentage for argument$minbut#{$min}was given.Function
color-tintsexpects a percentage for argument$maxbut#{$max}was given.Function
color-tintsexpects a positive integer for argument$xbut#{$x}was given.
Requires
-
[function]
is-color -
[function]
is-number -
[function]
is-percentage -
[function]
tint
color-shades
@function color-shades($color, $x: 0, $min: 0%, $max: 100%) { ... }
Description
Gets $x number of shades between the given $min and $max shade percentages
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$color
|
Some color |
Color
|
— none |
$x
|
The desired number of shades to produce |
Number
|
|
$min
|
The minimum shade percentage to use |
Number
|
|
$max
|
The maximum shade percentage to use |
Number
|
|
Returns
List
— A list of colors, where the first color is $color and last color is black if default $min and $max are used
Throws
Function
color-shadesexpects a color for argument$colorbut#{type-of($color)}was given.Function
color-shadesexpects a number for argument$xbut#{type-of($x)}was given.Function
color-shadesexpects a percentage for argument$minbut#{$min}was given.Function
color-shadesexpects a percentage for argument$maxbut#{$max}was given.Function
color-shadesexpects a positive integer for argument$xbut#{$x}was given.
Requires
-
[function]
is-color -
[function]
is-number -
[function]
is-percentage -
[function]
shade
color-tones
@function color-tones($color, $x: 0, $min: 0%, $max: 100%) { ... }
Description
Gets $x number of tones between the given $min and $max tone percentages
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$color
|
Some color |
Color
|
— none |
$x
|
The desired number of tones to produce |
Number
|
|
$min
|
The minimum tone percentage to use |
Number
|
|
$max
|
The maximum tone percentage to use |
Number
|
|
Returns
List
— A list of colors, where the first color is $color and last color is gray if default $min and $max are used
Throws
Function
color-tonesexpects a color for argument$colorbut#{type-of($color)}was given.Function
color-tonesexpects a number for argument$xbut#{type-of($x)}was given.Function
color-tonesexpects a percentage for argument$minbut#{$min}was given.Function
color-tonesexpects a percentage for argument$maxbut#{$max}was given.Function
color-tonesexpects a positive integer for argument$xbut#{$x}was given.
Requires
-
[function]
is-color -
[function]
is-number -
[function]
is-percentage -
[function]
tone
mixins
linear-gradient
@mixin linear-gradient($args..., $important) { ... }
Description
Creates a cross-browser linear gradient
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$args
|
Some arguments defining the gradient |
Arglist
|
— none |
$important
|
Sets the |
String
|
— none |
Requires
Used by
-
[mixin]
stripes -
[mixin]
n-stripes -
[mixin]
expand-properties
layered-linear-gradient
@mixin layered-linear-gradient($gradients..., $important) { ... }
Description
Creates a cross-browser layered linear gradient from one or more gradient arguments
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$gradients
|
One or more argument lists for a gradient |
Arglist
|
— none |
$important
|
Sets the |
String
|
— none |
Requires
radial-gradient
@mixin radial-gradient($args..., $important) { ... }
Description
Creates a cross-browser radial gradient
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$args
|
Some arguments defining the gradient |
Arglist
|
— none |
$important
|
Sets the |
String
|
— none |
Requires
Used by
-
[mixin]
expand-properties
layered-radial-gradient
@mixin layered-radial-gradient($gradients..., $important) { ... }
Description
Creates a cross-browser layered radial gradient from one or more gradient arguments
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$gradients
|
One or more argument lists for a gradient |
Arglist
|
— none |
$important
|
Sets the |
String
|
— none |
Requires
stripes
@mixin stripes($direction, $colors...) { ... }
Description
Creates a cross-browser striped background from the given colors, where stripes are evenly distributed
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$direction
|
The preferred direction of the striped background |
String
|
— none |
$colors
|
One or more colors to create a striped background from |
Arglist
|
— none |
Throws
Mixin
stripesreceived invalid value#{$direction}for argument$direction.Mixin
stripesexpects a list of colors for argument$colorsbut#{$color}was given.
Requires
-
[function]
is-string -
[function]
is-list -
[function]
is-arglist -
[function]
first -
[function]
tail -
[function]
contains -
[function]
prepend -
[function]
is-angle -
[function]
is-color -
[mixin]
linear-gradient
n-stripes
@mixin n-stripes($direction, $n, $color1..., $color2...) { ... }
Description
Creates a cross-browser striped background with $n stripes from the given colors
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$direction
|
The preferred direction of the striped background |
String
|
— none |
$n
|
The number of stripes that are desired, a minimum of |
Number
|
— none |
$color1
|
The first or main stripe color |
Arglist
|
— none |
$color2
|
The second stripe color |
Arglist
|
— none |
Throws
Mixin
n-stripesreceived invalid value#{$direction}for argument$direction.Mixin
n-stripesexpects an integer greater than or equal to 2 for argument$nbut#{$n}was given.Mixin
n-stripesexpects a list of colors for argument$color1but#{$color1}was given.Mixin
n-stripesexpects a list of colors for argument$color2but#{$color2}was given.
Requires
-
[function]
is-string -
[function]
is-list -
[function]
is-arglist -
[function]
first -
[function]
tail -
[function]
contains -
[function]
prepend -
[function]
is-angle -
[function]
is-color -
[function]
is-number -
[function]
is-integer -
[variable]
brandy-light-text -
[mixin]
linear-gradient
Comparators
functions
eq
@function eq($a, $b...) { ... }
Description
Compares whether two values are equal
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$a
|
First value to compare |
Mixed
|
— none |
$b
|
Second value to compare |
Arglist
|
— none |
Returns
Boolean
neq
@function neq($a, $b...) { ... }
Description
Compares whether two values are not equal
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$a
|
First value to compare |
Mixed
|
— none |
$b
|
Second value to compare |
Arglist
|
— none |
Returns
Boolean
gt
@function gt($a, $b...) { ... }
Description
Compares whether the first value is greater than the second value
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$a
|
First value to compare |
Mixed
|
— none |
$b
|
Second value to compare |
Arglist
|
— none |
Returns
Boolean
gteq
@function gteq($a, $b...) { ... }
Description
Compares whether the first value is greater than or equal to the second value
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$a
|
First value to compare |
Mixed
|
— none |
$b
|
Second value to compare |
Arglist
|
— none |
Returns
Boolean
lt
@function lt($a, $b...) { ... }
Description
Compares whether the first value is less than the second value
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$a
|
First value to compare |
Mixed
|
— none |
$b
|
Second value to compare |
Arglist
|
— none |
Returns
Boolean
aeq
@function aeq($a, $b..., $e) { ... }
Description
Compares whether the first value is almost equal to the second value
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$a
|
First value to compare |
Mixed
|
— none |
$b
|
Second value to compare |
Arglist
|
— none |
$e
|
Allowed tolerance for errors |
Number
|
— none |
Returns
Boolean
Requires
-
[function]
cast-string -
[function]
cast-string -
[function]
flatten -
[function]
flatten -
[function]
is-string -
[function]
is-number -
[function]
is-map -
[function]
is-list -
[function]
is-arglist -
[function]
is-matrix -
[function]
is-boolean -
[function]
char-at
lteq
@function lteq($a, $b...) { ... }
Description
Compares whether the first value is less than or equal to the second value
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$a
|
First value to compare |
Mixed
|
— none |
$b
|
Second value to compare |
Arglist
|
— none |
Returns
Boolean
true
@function true($a) { ... }
Description
Determines if a value is equal to true
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$a
|
Some value to test |
Mixed
|
— none |
Returns
Boolean
false
@function false($a) { ... }
Description
Determines if a value is equal to false
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$a
|
Some value to test |
Mixed
|
— none |
Returns
Boolean
Components
mixins
grid
@mixin grid($name: 'grid', $items: 'griditem', $columns: 12, $rows: 100, $gutter: 25, $units: 'px' 'em' 'pct', $breaks: $brandy-screens-map) { ... }
Description
Creates a responsive grid system on the fly based on the given configurations
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$name
|
The class name used for the grid system |
String
|
|
$items
|
The class name used for each item within the grid system |
String
|
|
$columns
|
The maximum number of columns in the grid system |
Number
|
|
$rows
|
The maximum number of rows in the grid system |
Number
|
|
$gutter
|
The maximum gutter size for the grid system |
Number
|
|
$units
|
One or more units that the grid system supports, used to calculate gutter from class declarations |
List
|
|
$breaks
|
The recognized breakpoints at which the grid system will be responsive |
List
|
|
Requires
-
[variable]
brandy-screens-map -
[function]
first -
[function]
unit-to-digit -
[function]
build-media
burger
@mixin burger($width: 100%, $height: 5px, $gutter: 5px, $color: $brandy-dark-text, $radius: 0, $transition: all .25s) { ... }
Description
Creates a burger icon using pseudo elements :before and :after
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$width
|
The desired width of each bar within the burger icon |
Number
|
|
$height
|
The desired height of each bar within the burger icon |
Number
|
|
$gutter
|
The desired distance between bars within the burger icon |
Number
|
|
$color
|
The desired color(s) of each bar within the burger icon |
Color</code> or <code>List
|
|
$radius
|
The amount of border radius to add to each bar within the burger icon |
Number
|
|
$transition
|
The transition to be added to the burger icon during transition effects |
Number
|
|
Requires
-
[variable]
brandy-dark-text -
[mixin]
margin-y -
[function]
first
Author
Joren Van Hee
burger-mods
@mixin burger-mods() { ... }
Description
Allows further modification of the burger icon using @content directive. Intended for use with burger mixin.
Parameters
None.
Author
Joren Van Hee
burger-buns
@mixin burger-buns() { ... }
Description
Allows further modification of the top and bottom burger bars using @content directive. Intended for use with burger mixin.
Parameters
None.
Author
Joren Van Hee
burger-top
@mixin burger-top() { ... }
Description
Allows further modification of the top burger bar using @content directive. Intended for use with burger mixin.
Parameters
None.
Author
Joren Van Hee
burger-bottom
@mixin burger-bottom() { ... }
Description
Allows further modification of the bottom burger bar using @content directive. Intended for use with burger mixin.
Parameters
None.
Author
Joren Van Hee
burger-middle
@mixin burger-middle() { ... }
Description
Allows further modification of the middle burger bar using @content directive. Intended for use with burger mixin.
Parameters
None.
Author
Joren Van Hee
burger-to-close
@mixin burger-to-close($color: null) { ... }
Description
Adds a transformation animation to a burger icon, turning it into a close icon (X)
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$color
|
The preferred color of the close icon |
Color</code> or <code>Null
|
|
Requires
-
[function]
is-color
Author
Joren Van Hee
Configurations
variables
brandy-dark-text
$brandy-dark-text: rgb(51, 51, 51) !default;
Description
Sets the dark color value for the color-contrast() function.
The dark color will be returned when contrasting against light backgrounds.
Note, the color-contrast() function will attempt to contrast foreground
and background colors according to WebAIM accessibility standards.
Type
Color
Used by
-
[function]
color-contrast -
[mixin]
burger
brandy-light-text
$brandy-light-text: rgb(255, 255, 255) !default;
Description
Sets the light color value for the color-contrast() function.
The light color will be returned when contrasting against dark
backgrounds. Note, the color-contrast() function will attempt to contrast
foreground and background colors according to WebAIM accessibility standards.
Type
Color
Used by
-
[function]
color-contrast -
[mixin]
n-stripes
brandy-font-size
$brandy-font-size: 16px !default;
Description
Sets the default font size for unit conversion functions. Typically, this
font size should be set equal to the font size used for your body element.
Type
Number
Used by
-
[function]
convert-unit -
[function]
px -
[function]
pt -
[function]
pc -
[function]
in -
[function]
mm -
[function]
cm -
[function]
deg -
[function]
rad -
[function]
grad -
[function]
turn -
[function]
dpi -
[function]
dpcm -
[function]
dppx -
[function]
ms -
[function]
s -
[function]
hz -
[function]
khz -
[function]
rem -
[function]
em -
[function]
ex -
[function]
ch -
[function]
vw -
[function]
vh -
[function]
vmin -
[function]
vmax
brandy-bg-contrast
$brandy-bg-contrast: false !default;
Description
Set the color-contrast() function to use the given background color
to generate dark and light color values. Setting this to true tells
the color-contrast() function to ignore the values set for
$brandy-dark-text and $brandy-light-text. Setting this to false
will tell the color-contrast() function to use those values instead.
Note, the light and dark colors generated will be a shade or tint of the
input background color, respectively.
Type
Boolean
Used by
-
[function]
color-contrast
brandy-colors-map
$brandy-colors-map: (
'black': (
'base': #000000
),
'white': (
'base': #FFFFFF
),
'grey': (
'base': #CCCCCC,
'dark': #333333,
'light': #EFEFEF
),
'gray': (
'base': #CCCCCC,
'dark': #333333,
'light': #EFEFEF
)
) !default;
Description
Sets the default map to be used for the color() function. This value
can be set equal to a map or a variable which references a map. This
map can have up to three levels of depth, where first-level properties
should be color names, second-level properties should be color tones,
and optionally, third-level keys should be tonal amounts.
Type
Map
Map structure
| map key Name | map key Description | map key Type | map key Value |
|---|---|---|---|
<colorId> |
A preferred identifier for the given color |
String
|
— none |
<colorId>.base |
The default color tone |
Color
|
— none |
<colorId>.<toneId> |
Additional color tones |
Color</code> or <code>Map
|
— none |
<colorId>.<toneId>.<toneAmount> |
A tonal amount, usually representative of a percentage |
Color
|
— none |
Example
Sample definition
$brandy-colors-map (
'white': (
'base': white,
'off': whitesmoke
'opaque': (
25: rgba(white, .25),
50: rgba(white, .50),
75: rgba(white, .75)
)
)
);
Used by
brandy-fonts-map
$brandy-fonts-map: (
'sans-serif': sans-serif,
'serif': serif,
'monospace': monospace,
'cursive': cursive
) !default;
Description
Sets the default map to be used for the font() function. This value
can be set equal to a map or a variable which references a map and
may contain up to two levels of depth.
Type
Map
Map structure
| map key Name | map key Description | map key Type | map key Value |
|---|---|---|---|
<fontId> |
A preferred identifier for the given font or font family |
Font</code> or <code>List</code> or <code>Map
|
— none |
<fontId>.<fontClass> |
A sub-class of a given font or font family |
Font</code> or <code>List
|
— none |
Example
Sample definition
$brandy-fonts-map: (
'heading': (Impact, sans-serif),
'body': (
'text': (Arial, sans-serif),
'lead': (Georgia, serif)
)
);
Used by
brandy-screens-map
$brandy-screens-map: (
'mobile': max-width 400px,
'tablet': 401px 800px,
'desktop': min-width 801px
) !default;
Description
Sets the default map to be used for the screen() function. This value
can be set equal to a map or a variable which references a map.
Type
Map
Map structure
| map key Name | map key Description | map key Type | map key Value |
|---|---|---|---|
<screenId> |
A breakpoint associated with the corresponding screen identifier |
Number
|
— none |
Example
Sample definition
$brandy-screens-map: (
'mobile': max-width 400px,
'tablet': 401px 800px,
'desktop': min-width 801px
);
Used by
brandy-z-map
$brandy-z-map: (
'modal': 99,
'overlay': 88,
'menu': 77,
'dropdown': 66,
'header': 55,
'default': auto,
'normal': 1,
'below': -1
) !default;
Description
Sets the default map to be used for the z() function. This value
can be set equal to a map or a variable which references a map.
Type
Map
Map structure
| map key Name | map key Description | map key Type | map key Value |
|---|---|---|---|
<zLayer> |
A z-index layer |
Number
|
— none |
Example
Sample definition
$brandy-z-map: (
'modal': 99,
'overlay': 88,
'menu': 77,
'dropdown': 66,
'header': 55,
'default': auto,
'normal': 1,
'underneath': -1
);
Used by
brandy-scale-map
$brandy-scale-map: (
'mobile': 1,
'tablet': 1,
'desktop': 1
) !default;
Description
Sets the default map to be used for the scale-font() function. This value
can be set equal to a map or a variable which references a map. Each property
name in the map should also correspond to a key in the $brandy-screens-map.
Type
Map
Map structure
| map key Name | map key Description | map key Type | map key Value |
|---|---|---|---|
<screenId> |
A font scale associated with the corresponding screen identifier |
Number
|
— none |
Example
Sample definition
$brandy-scale-map: (
'mobile': 1,
'table': 1,
'desktop': 1
);
brandy-config-map
$brandy-config-map: () !default;
Description
Sets the default map to be used for the config() function. This value
can be set equal to a map or a variable which references a map and can
be nested as deep as desired.
Type
Map
Map structure
| map key Name | map key Description | map key Type | map key Value |
|---|---|---|---|
<configId> |
Some global configuration |
Mixed
|
— none |
Example
Sample definition
$brandy-config-map: (
'page-width': 900px,
);
Used by
brandy-const-map
$brandy-const-map: (
'PI': 3.1415926535897932384626433832795028841971693993751,
'E': 2.71828182845904523536028747135266249775724709369995,
'LN(2)': 0.6931471805599453,
'Z-INDEX': (
'MIN': −2147483648,
'MAX': 2147483648
)
) !default;
Description
Sets the default map to be used for the const() function. This value
can be set equal to a map or a variable which references a map and can
be nested as deep as desired.
Type
Map
Map structure
| map key Name | map key Description | map key Type | map key Value |
|---|---|---|---|
<constId> |
Some global constant or set of constants |
Mixed
|
— none |
Example
Sample definition
$brandy-const-map: (
'PI': 3.14159265358979323846264338327950288,
);
Used by
brandy-units
$brandy-units: (
'px': 0px,
'pt': 0pt,
'pc': 0pc,
'pica': 0pica,
'em': 0em,
'rem': 0rem,
'mm': 0mm,
'cm': 0cm,
'in': 0in,
'ex': 0ex,
'ch': 0ch,
'vw': 0vw,
'vh': 0vh,
'vmax': 0vmax,
'vmin': 0vmin,
'deg': 0deg,
'rad': 0rad,
'grad': 0grad,
'turn': 0turn,
'pct': 0%,
'%': 0%,
's': 0s,
'ms': 0ms,
'dpcm': 0dpcm,
'dppx': 0dppx,
'hz': 0hz,
'khz': 0khz,
'Hz': 0hz,
'kHz': 0khz,
'dpi': 0dpi
) !default;
Description
Defines the recognized units that Brandy uses for some functions and mixins.
Type
Map
Used by
-
[function]
unit-to-digit -
[function]
unit-to-digit -
[function]
convert-unit -
[function]
str-is-unit
brandy-symbols
$brandy-symbols: '~' '`' '!' '@' '#' '$' '%' '^' '&' '*' '(' ')' '-' '_' '+' '=' '{' '}' '[' ']' '|' '\\' '\'' '"' ':' ';' '<' ',' '>' '.' '?' '/';
Description
Defines the recognized symbolic characters that Brandy uses for some functions and mixins.
Type
List
Used by
-
[function]
str-is-symbol
brandy-letters
$brandy-letters: (
'a': 'A',
'b': 'B',
'c': 'C',
'd': 'D',
'e': 'E',
'f': 'F',
'g': 'G',
'h': 'H',
'i': 'I',
'j': 'J',
'k': 'K',
'l': 'L',
'm': 'M',
'n': 'N',
'o': 'O',
'p': 'P',
'q': 'Q',
'r': 'R',
's': 'S',
't': 'T',
'u': 'U',
'v': 'V',
'w': 'W',
'x': 'X',
'y': 'Y',
'z': 'Z',
) !default;
Description
Defines the recognized alphabet characters that Brandy uses for some functions and mixins. Use the map keys to represent lowercase letters and map values to represent uppercase letters.
Type
Map
Used by
-
[function]
range-alpha -
[function]
range-alpha-min-max -
[function]
str-is-letter
brandy-numbers
$brandy-numbers: (
'0': 0,
'1': 1,
'2': 2,
'3': 3,
'4': 4,
'5': 5,
'6': 6,
'7': 7,
'8': 8,
'9': 9
) !default;
Description
Defines the recognized numeric characters that Brandy uses for some function and mixins. Use the map keys to represent numbers in string form and the map values to represent numbers in their numeric form.
Type
Map
Used by
-
[function]
cast-number -
[function]
str-is-number
brandy-title-blacklist
$brandy-title-blacklist: 'a' 'an' 'the' 'and' 'but' 'for' 'yet' 'at' 'by' 'from' 'to' 'as' 'in' 'or' 'for' 'nor' 'on' 'of' 'up' !default;
Description
Defines a list of words that should not be capitalized when converting a string to titlecase.
Type
List
Used by
-
[function]
to-title-case
brandy-sort-order
$brandy-sort-order: (
"!", "#", "$", "%", "&", "'", "(", ")", "*", "+", ",", "-", ".", "/", "[", "\\", "]", "^", "_", "{", "|", "}", "~",
'0', '1', '2', '3', '4', '5', '6', '7', '8', '9',
'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z'
) !default;
Description
Defines the default sort order for characters
Type
List
Used by
-
[function]
sort
Fonts
functions
font-source
@function font-source($family, $path, $formats: 'ttf' 'woff' 'woff2' 'eot' 'svg', $replacement: '-') { ... }
Description
Builds a font source declaration for use with @font-face definitions
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$family
|
The preferred name for the font family, also used for the main identifier in |
String
|
— none |
$path
|
The path to the font file, including the filename but excluding the file extension |
String
|
— none |
$formats
|
The available font formats as a list of file extensions |
List
|
|
$replacement
|
A string used to replace spaces in font family names |
String
|
|
Returns
List
Throws
Function
font-sourceexpects a string for argument$familybut#{type-of($family)}was given.Function
font-sourceexpects a string for argument$pathbut#{type-of($path)}was given.Function
font-sourceexpects a string for argument$replacementbut#{type-of($replacement)}was given.Function
font-sourceexpects a list for argument$formatsbut#{type-of($formats)}was given.Function
font-sourcedoes not recognize the invalid font format#{$format}.
Requires
-
[function]
str-replace -
[function]
is-string -
[function]
is-list -
[function]
contains
Used by
-
[mixin]
font-face
Author
Thoughtbot, Inc.
mixins
google-font
@mixin google-font($fonts...) { ... }
Description
Loads a font from Google Fonts
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$fonts
|
A list of font names followed by any font weights, such as |
Arglist
|
— none |
Throws
'Mixin
google-fontcould not load invalid font weight#{$w}.'
Requires
scale-font
@mixin scale-font($elements, $min, $max, $save, $increasing: false, $responsive: true, $scale: $brandy-scale-map, $breaks: $brandy-screens-map) { ... }
Description
Allows font size to be proportionately scaled across breakpoints and/or a given set of elements
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$elements
|
A list of elements that should have font sizes assigned according to scale |
List
|
— none |
$min
|
The minimum font size allowed when scaling |
Number
|
— none |
$max
|
The maximum font size allowed when scaling |
Number
|
— none |
$save
|
A variable pointing to a map where scaled font sizes should be saved to at a global level or |
Map</code> or <code>Null
|
— none |
$increasing
|
Whether to increase or decrease font sizes according to scale |
Boolean
|
|
$responsive
|
Whether to also make font sizes scale responsive across defined breakpoints |
Boolean
|
|
$scale
|
A map containing font scales by breakpoint name |
Map
|
|
$breaks
|
A map containing named breakpoints |
Map
|
|
Throws
Mixin
scale-fontexpects a number for argument$minbut#{type-of($min)}was given.Mixin
scale-fontexpects a number for argument$maxbut#{type-of($max)}was given.Mixin
scale-fontexpectstrueorfalsefor argument$increasingbut#{$increasing}was given.Mixin
scale-fontexpectstrueorfalsefor argument$responsivebut#{$responsive}was given.
Requires
-
[function]
is-number -
[function]
contains -
[function]
numeric-scale -
[function]
map-set
font-face
@mixin font-face($family, $path, $formats: 'ttf' 'woff2' 'woff' 'eot' 'svg') { ... }
Description
Creates a @font-face declaration
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$family
|
Some font family name |
String
|
— none |
$path
|
The path to the font file including the filename but excluding the file extension |
String
|
— none |
$formats
|
A list of supported font formats |
List
|
|
Requires
-
[function]
font-source
Author
Thoughbot, Inc.
Getters
functions
config
@function config($property) { ... }
Description
Gets a value from the $brandy-config-map
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$property
|
A property from the configuration set given in dot notation |
String
|
— none |
Returns
Mixed
Throws
Unknown configuration
#{$property}.
Requires
-
[function]
str-split -
[function]
map-deep-get -
[variable]
brandy-config-map -
[function]
map-has-keys
const
@function const($property) { ... }
Description
Gets a value from the $brandy-const-map
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$property
|
A property from the constants map given in dot notation |
String
|
— none |
Returns
Mixed
Throws
Unknown constant
#{$property}.
Requires
-
[function]
str-split -
[function]
map-deep-get -
[variable]
brandy-const-map -
[function]
map-has-keys
Used by
color
@function color($property, $tone: 'base', $amount: null) { ... }
Description
Gets a value from the $brandy-colors-map
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$property
|
A property from the colors map given in dot notation |
String
|
— none |
$tone
|
A preferred color tone |
String
|
|
$amount
|
A tonal amount, usually representing a percent |
String
|
|
Returns
Mixed
Throws
Unknown color
#{$property}.
Requires
-
[function]
str-split -
[function]
map-deep-get -
[function]
cast-string -
[variable]
brandy-colors-map
font
@function font($property) { ... }
Description
Gets a value from the $brandy-fonts-map
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$property
|
A property from the fonts map given in dot notation |
String
|
— none |
Returns
Mixed
Throws
Unknown font
#{$property}.
Requires
-
[function]
str-split -
[function]
map-deep-get -
[variable]
brandy-fonts-map -
[function]
map-has-keys
screen
@function screen($property) { ... }
Description
Gets a value from the $brandy-screens-map
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$property
|
A property from the screens map given in dot notation |
String
|
— none |
Returns
Mixed
Throws
Unknown screen
#{$property}.
Requires
-
[function]
str-split -
[function]
map-deep-get -
[variable]
brandy-screens-map -
[function]
map-has-keys
z
@function z($property) { ... }
Description
Gets a value from the $brandy-z-map
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$property
|
A property from the z map given in dot notation |
String
|
— none |
Returns
Mixed
Throws
Unknown z-layer
#{$property}.
Requires
-
[function]
str-split -
[function]
map-deep-get -
[variable]
brandy-z-map -
[function]
map-has-keys
Helpers
mixins
expand-properties
@mixin expand-properties($props) { ... }
Description
Expands a map of key-value pairs to property-value declarations
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$props
|
A map of properties and their values to be expanded |
Map
|
— none |
Requires
-
[mixin]
linear-gradient -
[mixin]
radial-gradient -
[function]
color-contrast
Layout
mixins
border-right-radius
@mixin border-right-radius($radius) { ... }
Description
Adds a border radius to the right side of an element
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$radius
|
Some radius amount |
Number
|
— none |
border-top-radius
@mixin border-top-radius($radius) { ... }
Description
Adds a border radius to the top side of an element
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$radius
|
Some radius amount |
Number
|
— none |
border-left-radius
@mixin border-left-radius($radius) { ... }
Description
Adds a border radius to the left side of an element
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$radius
|
Some radius amount |
Number
|
— none |
border-bottom-radius
@mixin border-bottom-radius($radius) { ... }
Description
Adds a border radius to the bottom side of an element
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$radius
|
Some radius amount |
Number
|
— none |
border-diagonal-radius
@mixin border-diagonal-radius($radius, $direction) { ... }
Description
Adds a border radius to on an element the given diagonal
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$radius
|
Some radius amount |
Number
|
— none |
$direction
|
Whether to start at the top |
String
|
— none |
Throws
Mixin
border-diagonal-radiusexpectsleftorrightfor argument$directionbut#{$direction}was given.
Requires
-
[function]
contains
size
@mixin size($size) { ... }
Description
Sets the width and height equally for an element
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$size
|
Some length |
Number
|
— none |
Used by
-
[mixin]
visually-hidden -
[mixin]
triangle -
[mixin]
chevron -
[mixin]
circle -
[mixin]
square
aspect-ratio
@mixin aspect-ratio($ratio, $width) { ... }
Description
Sets the fluid aspect ratio of an element
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$ratio
|
Some aspect ratio in the form of |
Number
|
— none |
$width
|
The desired width as a percentage |
Number
|
— none |
Throws
Mixin
aspect-ratioexpects a percentage for argument$widthbut#{$width}was given.
Requires
-
[function]
is-percentage
margin-y
@mixin margin-y($margin) { ... }
Description
Sets top and bottom margin equally
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$margin
|
Some margin size |
Number
|
— none |
Used by
-
[mixin]
burger
margin-x
@mixin margin-x($margin) { ... }
Description
Sets left and right margin equally
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$margin
|
Some margin size |
Number
|
— none |
margin-center
@mixin margin-center() { ... }
Description
Sets left and right margin to auto, used for centering block-level elements
Parameters
None.
padding-y
@mixin padding-y($padding) { ... }
Description
Sets top and bottom padding equally
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$padding
|
Some padding size |
Number
|
— none |
padding-x
@mixin padding-x($padding) { ... }
Description
Sets left and right padding equally
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$padding
|
Some padding size |
Number
|
— none |
border-y
@mixin border-y($border) { ... }
Description
Sets top and bottom border equally
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$border
|
Some border setting |
Number
|
— none |
Used by
border-x
@mixin border-x($border) { ... }
Description
Sets left and right border equally
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$border
|
Some border setting |
Number
|
— none |
Used by
absolute
@mixin absolute($offset) { ... }
Description
A shorthand for absolute positioning
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$offset
|
Some |
List</code> or <code>Number
|
— none |
Requires
-
[mixin]
position
relative
@mixin relative($offset) { ... }
Description
A shorthand for relative positioning
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$offset
|
Some |
List</code> or <code>Number
|
— none |
Requires
-
[mixin]
position
fixed
@mixin fixed($offset) { ... }
Description
A shorthand for fixed positioning
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$offset
|
Some |
List</code> or <code>Number
|
— none |
Requires
-
[mixin]
position
position
@mixin position($offset, $position: null) { ... }
Description
Sets top, right, bottom, left, and optionally position properties in one fell swoop
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$offset
|
Some |
List</code> or <code>Number
|
— none |
$position
|
The positioning property for the element |
String
|
|
Requires
Used by
position-y
@mixin position-y($offset, $position: null) { ... }
Description
Sets top, bottom, and optionally position properties in one fell swoop
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$offset
|
Some |
List</code> or <code>Number
|
— none |
$position
|
The positioning property for the element |
String
|
|
Requires
position-x
@mixin position-x($offset, $position: null) { ... }
Description
Sets left, right, and optionally position properties in one fell swoop
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$offset
|
Some |
List</code> or <code>Number
|
— none |
$position
|
The positioning property for the element |
String
|
|
Requires
absolute-center-within-container
@mixin absolute-center-within-container() { ... }
Description
Absolutely centers an element within its container using absolute positioning.
Only works if the container's position is set to absolute or relative.
Parameters
None.
Used by
-
[mixin]
chevron
absolute-center-within-container-x
@mixin absolute-center-within-container-x() { ... }
Description
Absolutely centers an element horizontally within its container using absolute positioning.
Only works if the container's position is set to absolute or relative.
Parameters
None.
absolute-center-within-container-y
@mixin absolute-center-within-container-y() { ... }
Description
Absolutely centers an element vertically within its container using absolute positioning.
Only works if the container's position is set to absolute or relative.
Parameters
None.
absolute-center-contents
@mixin absolute-center-contents() { ... }
Description
Absolutely centers the contents of an element using the flexbox method
Parameters
None.
absolute-center-contents-y
@mixin absolute-center-contents-y() { ... }
Description
Absolutely centers the contents of an element vertically using the flexbox method
Parameters
None.
absolute-center-contents-x
@mixin absolute-center-contents-x() { ... }
Description
Absolutely centers the contents of an element horizontally using the flexbox method
Parameters
None.
clearfix
@mixin clearfix($before: false) { ... }
Description
Adds a clearfix for floated elements
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$before
|
Whether the clearfix should come |
Boolean
|
|
Author
Thoughtbot, Inc.
ellipsis
@mixin ellipsis() { ... }
Description
Truncates a single line of text with an ellipsis. Properties overflow, white-space, and text-overflow are essential here.
Only works on single lines of text. Multiple lines of text must be truncated with a JavaScript-based solution or similar.
Parameters
None.
Author
Thoughtbot, Inc.
Lists
functions
first
@function first($list) { ... }
Description
Retrieves the first item in a list
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$list
|
Some list |
List</code> or <code>Arglist
|
— none |
Returns
Mixed
Throws
Cannot get
firstitem from non-list#{$list}.
Requires
-
[function]
is-list -
[function]
is-arglist
Used by
-
[function]
cast-map -
[mixin]
stripes -
[mixin]
n-stripes -
[mixin]
grid -
[mixin]
burger -
[mixin]
google-font -
[mixin]
position -
[mixin]
position-y -
[mixin]
position-x -
[function]
starts-with -
[function]
count -
[function]
stringify -
[function]
unstringify -
[function]
joins -
[function]
map-deep-set -
[function]
map-has-keys -
[function]
matrix-columns -
[function]
matrix-has-coords -
[function]
matrix-set -
[function]
matrix-set-diagonal -
[function]
matrix-get -
[function]
matrix-get-diagonal -
[function]
matrix-coords -
[function]
matrix-swap -
[function]
matrix-swap -
[function]
matrix-is-diagonal -
[function]
matrix-is-upper-triangular -
[function]
matrix-is-lower-triangular -
[function]
are-coords -
[function]
sprite -
[function]
sprite-set-size -
[function]
sprite-position -
[function]
str-between -
[function]
chars-between
Author
Hugo Giraudel
last
@function last($list) { ... }
Description
Retrieves the last item in a list
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$list
|
Some list |
List</code> or <code>Arglist
|
— none |
Returns
Mixed
Throws
Cannot get
lastitem from non-list#{$list}.
Requires
-
[function]
is-list -
[function]
is-arglist
Used by
-
[function]
cast-list -
[mixin]
linear-gradient -
[mixin]
layered-linear-gradient -
[mixin]
radial-gradient -
[mixin]
layered-radial-gradient -
[mixin]
position -
[mixin]
position-y -
[mixin]
position-x -
[function]
ends-with -
[function]
map-deep-set -
[function]
map-has-keys -
[function]
map-extend -
[function]
matrix-has-coords -
[function]
matrix-set -
[function]
matrix-get -
[function]
matrix-swap -
[function]
matrix-swap -
[function]
are-coords -
[mixin]
at-least -
[mixin]
at-most -
[mixin]
in-between -
[function]
sprite -
[function]
sprite-set-size -
[function]
sprite-position -
[function]
str-between -
[function]
chars-between
Author
Hugo Giraudel
last-index
@function last-index($list, $value) { ... }
Description
Retrieves the last index of a value in a list
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$list
|
Some list |
List</code> or <code>Arglist
|
— none |
$value
|
Some value to be searched for |
Mixed
|
— none |
Returns
Number
— Returns the index of the last occurrence of the value or 0 when not found
Throws
Cannot get
last-indexfrom non-list#{$list}.
Requires
-
[function]
is-list -
[function]
is-arglist
Author
Hugo Giraudel
prepend
@function prepend($list, $value) { ... }
Description
Adds an item to the beginning of a list
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$list
|
Some list |
List</code> or <code>Arglist
|
— none |
$value
|
Some value to add to the beginning of the list |
Mixed
|
— none |
Returns
List
Throws
Cannot execute
prependon non-list#{$list}.
Requires
-
[function]
is-list -
[function]
is-arglist
Used by
Author
Hugo Giraudel
insert-nth
@function insert-nth($list, $index, $value) { ... }
Description
Inserts a value at the nth index within a list
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$list
|
Some list |
List</code> or <code>Arglist
|
— none |
$index
|
The index where the value should be inserted |
Number
|
— none |
$value
|
Some value to be inserted into the list |
Mixed
|
— none |
Returns
List
Throws
Cannot execute
insert-nthon non-list#{$list}.Function
insert-nthexpects a number for argument$indexbut#{type-of($index)}was given.
Requires
-
[function]
is-list -
[function]
is-arglist -
[function]
is-number
Used by
-
[function]
sort
Author
Hugo Giraudel
replace
@function replace($list, $old, $new, $recursive: false) { ... }
Description
Replaces one or more occurrences of a value within a list with a new value
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$list
|
Some list |
List</code> or <code>Arglist
|
— none |
$old
|
The old value to be replaced |
Mixed
|
— none |
$new
|
The new value to be inserted in place of the old value |
Mixed
|
— none |
$recursive
|
Determines whether only the first occurrence or all occurrences should be replaced |
Boolean
|
|
Returns
List
Throws
Cannot execute
replaceon non-list#{$list}.Function
replaceexpectstrueorfalsefor argument$recursivebut#{$recursive}was given.
Requires
-
[function]
is-list -
[function]
is-arglist -
[function]
contains
Author
Hugo Giraudel
replace-nth
@function replace-nth($list, $index, $value) { ... }
Description
Replaces a value at the nth index within a list
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$list
|
Some list |
List</code> or <code>Arglist
|
— none |
$index
|
The index where the value should be replaced |
Number
|
— none |
$value
|
The value to be inserted in place of the old value |
Mixed
|
— none |
Returns
List
Throws
Cannot execute
replace-nthon non-list#{$list}.Function
replace-nthexpects a number for argument$indexbut#{type-of($index)}was given.
Requires
-
[function]
is-list -
[function]
is-arglist -
[function]
is-number
Author
Hugo Giraudel
remove
@function remove($list, $value, $recurive: false) { ... }
Description
Removes one or more occurrences of a value from a list
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$list
|
Some list |
List</code> or <code>Arglist
|
— none |
$value
|
Some value to be removed from the list |
Mixed
|
— none |
$recurive
|
Determines whether only the first occurrence or all occurrences should be removed |
Boolean
|
|
Returns
List
Throws
Cannot execute
removeon non-list#{$list}.Function
removeexpectstrueorfalsefor argument$recursivebut#{$recursive}was given.
Requires
-
[function]
is-list -
[function]
is-arglist -
[function]
contains
Used by
-
[mixin]
remove-buttons -
[mixin]
remove-text-inputs -
[mixin]
remove-list-inputs -
[mixin]
remove-file-inputs -
[mixin]
remove-toggle-inputs -
[mixin]
remove-toggle-inputs
Author
Hugo Giraudel
remove-nth
@function remove-nth($list, $index) { ... }
Description
Rremoves a value at the nth index within a list
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$list
|
Some list |
List</code> or <code>Arglist
|
— none |
$index
|
The index where the value should be removed |
Number
|
— none |
Returns
List
Throws
Cannot execute
remove-nthon non-list#{$list}.Function
remove-nthexpects a number for argument$indexbut#{type-of($index)}was given.
Requires
-
[function]
is-list -
[function]
is-arglist -
[function]
is-number
Author
Hugo Giraudel
slice
@function slice($list, $start: 1, $end: length($list)) { ... }
Description
Extracts a subset of a list between a starting and ending point
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$list
|
Some list |
List</code> or <code>Arglist
|
— none |
$start
|
The starting index where the slice should begin |
Number
|
|
$end
|
The ending index where the slice should stop |
Number
|
|
Returns
List
Throws
Cannot execute
sliceon non-list#{$list}.Function
sliceexpects a number for argument$startbut#{type-of($start)}was given.Function
sliceexpects a number for argument$endbut#{type-of($end)}was given.Cannot execute
slicewhen start#{$start}exceeds end#{$end}.
Requires
-
[function]
is-list -
[function]
is-arglist -
[function]
is-number -
[function]
is-negative
Used by
Author
Hugo Giraudel
reverse
@function reverse($list, $recursive: false) { ... }
Description
Reverses the order of items within a list
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$list
|
Some list |
List</code> or <code>Arglist
|
— none |
$recursive
|
Determines whether nested lists should also be reversed |
Boolean
|
|
Returns
List
Throws
Cannot execute
reverseon non-list#{$list}.Function
reverseexpectstrueorfalsefor argument$recursivebut#{$recursive}was given.
Requires
-
[function]
is-list -
[function]
is-arglist -
[function]
contains
Used by
-
[function]
is-symmetrical
Author
Hugo Giraudel
shuffle
@function shuffle($list, $recursive: false) { ... }
Description
Shuffles the order of items within a list
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$list
|
Some list |
List</code> or <code>Arglist
|
— none |
$recursive
|
Determines whether nested lists should also be shuffled |
Boolean
|
|
Returns
List
Throws
Cannot execute
shuffleon non-list#{$list}.Function
shuffleexpectstrueorfalsefor argument$recursivebut#{$recursive}was given.
Requires
-
[function]
is-list -
[function]
is-arglist -
[function]
contains
Used by
-
[function]
matrix-shuffle -
[function]
str-shuffle
glue
@function glue($list, $glue: '', $nested: false) { ... }
Description
Glues a list together with a string to form a string
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$list
|
Some list |
List</code> or <code>Arglist
|
— none |
$glue
|
Acts as the glue between list items |
String
|
|
$nested
|
Determines whether the list is part of a nested list, used for recursion |
Boolean
|
|
Returns
String or Null
Throws
Cannot execute
glueon non-list#{$list}.Function
glueexpects a string for argument$gluebut#{type-of($glue)}was given.Function
glueexpectstrueorfalsefor argument$nestedbut#{$nested}was given.
Requires
-
[function]
is-list -
[function]
is-arglist -
[function]
is-string -
[function]
contains
Used by
-
[mixin]
google-font -
[function]
str-shuffle -
[function]
to-capitalize -
[function]
to-title-case
Author
Hugo Giraudel
shift-index
@function shift-index($list, $shift: 1) { ... }
Description
Reindexes a list by the given value
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$list
|
Some list |
List</code> or <code>Arglist
|
— none |
$shift
|
The number of places by which to shift the list indices |
Number
|
|
Returns
List
Throws
Cannot execute
shift-indexon non-list#{$list}.Function
shift-indexexpects a number for argument$valuebut#{type-of($value)}was given.
Requires
-
[function]
is-list -
[function]
is-arglist -
[function]
is-number
Author
Ana Tudor
contains
@function contains($list, $search) { ... }
Description
Determines whether or not the list contains the given value
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$list
|
Some list |
List</code> or <code>Arglist
|
— none |
$search
|
The value to be searched for |
Mixed
|
— none |
Returns
Boolean
Throws
Cannot execute
containson non-list#{$list}.
Requires
-
[function]
is-list -
[function]
is-arglist
Used by
-
[function]
cast-boolean -
[function]
cast-list -
[mixin]
stripes -
[mixin]
n-stripes -
[function]
font-source -
[mixin]
scale-font -
[mixin]
border-diagonal-radius -
[mixin]
position -
[mixin]
position-y -
[mixin]
position-x -
[mixin]
visually-hidden -
[mixin]
textually-hidden -
[function]
replace -
[function]
remove -
[function]
reverse -
[function]
shuffle -
[function]
glue -
[function]
unique -
[function]
intersection -
[function]
range-alpha -
[function]
range-alpha-min-max -
[function]
sum -
[function]
avg -
[function]
matrix-from -
[function]
matrix-columns -
[function]
matrix-get-diagonal -
[function]
matrix-is-diagonal -
[function]
matrix-is-upper-triangular -
[function]
matrix-is-lower-triangular -
[function]
convert-unit -
[function]
is-angle -
[function]
is-frequency -
[function]
is-relative-length -
[function]
is-absolute-length -
[function]
is-resolution -
[function]
is-time -
[function]
decimal-round -
[function]
decimal-ceil -
[function]
decimal-floor -
[function]
numeric-scale -
[function]
build-media -
[mixin]
placeholder -
[mixin]
spinner -
[mixin]
triangle -
[mixin]
chevron -
[mixin]
circle -
[mixin]
square -
[mixin]
sprite-image -
[function]
str-is-symbol -
[function]
str-between -
[function]
chars-between -
[function]
str-pad -
[function]
to-title-case -
[function]
is-position -
[mixin]
add-buttons -
[mixin]
remove-buttons -
[mixin]
add-text-inputs -
[mixin]
remove-text-inputs -
[mixin]
add-list-inputs -
[mixin]
remove-list-inputs -
[mixin]
add-file-inputs -
[mixin]
remove-file-inputs -
[mixin]
add-toggle-inputs -
[mixin]
remove-toggle-inputs -
[mixin]
add-headings -
[mixin]
remove-toggle-inputs
starts-with
@function starts-with($list, $search) { ... }
Description
Determines whether or not the list starts with the given value
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$list
|
Some list |
List</code> or <code>Arglist
|
— none |
$search
|
The value to be searched for |
Mixed
|
— none |
Returns
Boolean
Throws
Cannot execute
starts-withon non-list#{$list}.
Requires
-
[function]
is-list -
[function]
is-arglist -
[function]
first
ends-with
@function ends-with($list, $search) { ... }
Description
Determines whether or not the list ends with the given value
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$list
|
Some list |
List</code> or <code>Arglist
|
— none |
$search
|
The value to be searched for |
Mixed
|
— none |
Returns
Boolean
Throws
Cannot execute
ends-withon non-list#{$list}.
Requires
-
[function]
is-list -
[function]
is-arglist -
[function]
last
chunk
@function chunk($list, $length) { ... }
Description
Chunks a list into subsets of the given size
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$list
|
Some list |
List</code> or <code>Arglist
|
— none |
$length
|
The maximum length of chunked lists |
Number
|
— none |
Returns
List
Throws
Cannot execute
chunkon non-list#{$list}.Function
chunkexpects a number for argument$lengthbut#{type-of($length)}was given.
Requires
-
[function]
is-list -
[function]
is-arglist -
[function]
is-number
count
@function count($list, $items...) { ... }
Description
Counts the number of times a value occurs within a list
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$list
|
Some list |
List</code> or <code>Arglist
|
— none |
$items
|
Filters the items to be counted |
Arglist
|
— none |
Returns
Map or Number
Throws
Cannot execute
counton non-list#{$list}.Function
countexpects an arglist for argument$itemsbut #{type-of($items)}` was given.
Requires
-
[function]
first -
[function]
is-list -
[function]
is-arglist -
[function]
is-arglist -
[function]
cast-list
every
@function every($list, $test, $input...) { ... }
Description
Tests if every item in the list meets some criteria presented by the $test function
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$list
|
Some list |
List</code> or <code>Arglist
|
— none |
$test
|
The name of the function to be used as a test |
String
|
— none |
$input
|
Any arguments to pass into the function |
Arglist
|
— none |
Returns
Boolean
Throws
Cannot execute
everyon non-list#{$list}.Function
everyexpects a string for argument$testbut#{type-of($test)}was given.Cannot execute
everydue to invalid function#{$test}.
Requires
-
[function]
is-list -
[function]
is-arglist -
[function]
is-string
Used by
-
[function]
matrix-is-diagonal -
[function]
matrix-is-diagonal -
[function]
matrix-is-upper-triangular -
[function]
matrix-is-upper-triangular -
[function]
matrix-is-upper-triangular -
[function]
matrix-is-lower-triangular -
[function]
matrix-is-lower-triangular -
[function]
matrix-is-lower-triangular
some
@function some($list, $test, $input...) { ... }
Description
Tests if some items in the list meet some criteria presented by the $test function
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$list
|
Some list |
List</code> or <code>Arglist
|
— none |
$test
|
The name of the function to be used as a test |
String
|
— none |
$input
|
Any arguments to pass into the function |
Arglist
|
— none |
Returns
Boolean
Throws
Cannot execute
someon non-list#{$list}.Function
someexpects a string for argument$testbut#{type-of($test)}was given.Cannot execute
somedue to invalid function#{$test}.
Requires
-
[function]
is-list -
[function]
is-arglist -
[function]
is-string
is-empty
@function is-empty($list) { ... }
Description
Determines if a list is empty
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$list
|
Some list |
List</code> or <code>Arglist
|
— none |
Returns
Boolean
Throws
Cannot execute
is-emptyon non-list#{$list}.
Requires
-
[function]
is-list -
[function]
is-arglist
Used by
-
[function]
chance -
[function]
map-has-keys -
[function]
map-extend -
[function]
map-set
is-multiple
@function is-multiple($list) { ... }
Description
Determines if a list contains more than one item
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$list
|
Some list |
List</code> or <code>Arglist
|
— none |
Returns
Boolean
Throws
Cannot execute
is-multipleon non-list#{$list}.
Requires
-
[function]
is-list -
[function]
is-arglist
is-single
@function is-single($list) { ... }
Description
Determines if a list contains only one item
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$list
|
Some list |
List</code> or <code>Arglist
|
— none |
Returns
Boolean
Throws
Cannot execute
is-singleon non-list#{$list}.
Requires
-
[function]
is-list -
[function]
is-arglist
unique
(aliased as
only
)
@function unique($list) { ... }
Description
Removes duplicate values from a list
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$list
|
Some list |
List</code> or <code>Arglist
|
— none |
Returns
List
Throws
Cannot execute
uniqueon non-list#{$list}.
Requires
-
[function]
is-list -
[function]
is-arglist -
[function]
contains
Used by
-
[function]
intersection -
[function]
sprite
is-truthy
@function is-truthy($list) { ... }
Description
Determines if every value in a list is equal to true
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$list
|
Some list |
List</code> or <code>Arglist
|
— none |
Returns
Boolean
Throws
Cannot execute
is-truthyon non-list#{$list}.
Requires
-
[function]
is-list -
[function]
is-arglist
is-falsy
@function is-falsy($list) { ... }
Description
Determines if every value in a list is equal to false
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$list
|
Some list |
List</code> or <code>Arglist
|
— none |
Returns
Boolean
Throws
Cannot execute
is-falsyon non-list#{$list}.
Requires
-
[function]
is-list -
[function]
is-arglist
intersection
@function intersection($list, $lists...) { ... }
Description
Pinpoints the intersection between two or more lists
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$list
|
Some list to be used as a reference |
List</code> or <code>Arglist
|
— none |
$lists
|
Additional lists to be used for comparison |
Arglist
|
— none |
Returns
List
Throws
Cannot execute
intersectionon non-list#{$list}.
Requires
-
[function]
is-list -
[function]
is-arglist -
[function]
unique -
[function]
contains
is-symmetrical
@function is-symmetrical($list) { ... }
Description
Determines whether a list is symmetrical
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$list
|
Some list |
List</code> or <code>Arglist
|
— none |
Returns
Boolean
Throws
Cannot execute
is-symmetricalon non-list#{$list}.
Requires
-
[function]
is-list -
[function]
is-arglist -
[function]
reverse
scrub
@function scrub($list) { ... }
Description
Removes empty values, such as null, false, '', and (), from a list
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$list
|
Some list |
List</code> or <code>Arglist
|
— none |
Returns
List
Throws
Cannot execute
scrubon non-list#{$list}.
Requires
-
[function]
is-list -
[function]
is-arglist
chance
@function chance($list) { ... }
Description
Retrieves a random item from a list
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$list
|
Some list |
List</code> or <code>Arglist
|
— none |
Returns
Mixed
Throws
Cannot execute
chanceon non-list#{$list}.Cannot return a random value from an empty list.
Requires
-
[function]
is-list -
[function]
is-arglist -
[function]
is-empty
range
@function range($n) { ... }
Description
Builds a list with values ranging from 1 through $n
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$n
|
Maximum index |
Number
|
— none |
Returns
List
Throws
Function
rangeexpects a number for argument$nbut#{type-of($n)}was given.Cannot create range from invalid number
#{$n}.Cannot create range from negative number
#{$n}.
Requires
-
[function]
is-number -
[function]
str-is-number -
[function]
strip-unit
range-min-max
@function range-min-max($min, $max) { ... }
Description
Builds a list with values ranging from $min through $max
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$min
|
Minimum value |
Number
|
— none |
$max
|
Maximum value |
Number
|
— none |
Returns
List
Throws
Cannot create range from invalid minimum
#{$min}.Function
range-min-maxexpects a numnber for argument$minbut#{type-of($min)}was given.Cannot create range from invalid maximum
#{$max}.Function
range-min-maxexpects a numnber for argument$maxbut#{type-of($max)}was given.
Requires
-
[function]
cast-number -
[function]
cast-number -
[function]
is-string -
[function]
is-number -
[function]
str-is-number -
[function]
extract-unit -
[function]
strip-unit -
[function]
unit-to-digit
range-alpha
@function range-alpha($x, $lowercase: true) { ... }
Description
Builds a list with values ranging from a through $x
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$x
|
Maximum index |
String
|
— none |
$lowercase
|
Whether the result should be lowercase or uppercase |
Boolean
|
|
Returns
List
Throws
Function
range-alphaexpects a string for argument$xbut#{type-of($x)}was given.Function
range-alphaexpectstrueorfalsefor argument$lowercasebut#{$lowercase}was given.Cannot create range from invalid letter
#{$x}.
Requires
-
[function]
is-string -
[function]
contains -
[function]
str-is-letter -
[function]
cast-string -
[variable]
brandy-letters
range-alpha-min-max
@function range-alpha-min-max($min, $max, $lowercase: true) { ... }
Description
Builds a list with letters ranging from $min through $max
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$min
|
Minimum value |
String
|
— none |
$max
|
Maximum value |
String
|
— none |
$lowercase
|
Whether the result should be lowercase or uppercase |
Boolean
|
|
Returns
List
Throws
Function
range-alpha-min-maxexpects a string for argument$minbut#{type-of($min)}was given.Function
range-alpha-min-maxexpects a string for argument$maxbut#{type-of($max)}was given.Function
range-alpha-min-maxexpectstrueorfalsefor argument$lowercasebut#{$lowercase}was given.Cannot create range from invalid minimum
#{$min}.Cannot create range from invalid maximum
#{$max}.
Requires
-
[function]
is-string -
[function]
contains -
[function]
str-is-letter -
[function]
cast-string -
[variable]
brandy-letters
stringify
@function stringify($list) { ... }
Description
Converts every item in a list to a string
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$list
|
— none |
List</code> or <code>Arglist
|
— none |
Returns
List
Throws
Cannot execute
stringifyon non-list#{$list}.
Requires
-
[function]
is-list -
[function]
is-arglist -
[function]
cast-string -
[function]
first
Used by
-
[function]
sum -
[mixin]
add-buttons -
[mixin]
remove-buttons -
[mixin]
add-text-inputs -
[mixin]
remove-text-inputs -
[mixin]
add-list-inputs -
[mixin]
remove-list-inputs -
[mixin]
add-file-inputs -
[mixin]
remove-file-inputs -
[mixin]
add-toggle-inputs -
[mixin]
remove-toggle-inputs -
[mixin]
add-headings -
[mixin]
remove-toggle-inputs
unstringify
@function unstringify($list) { ... }
Description
Converts unquotes every string in a list
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$list
|
— none |
List</code> or <code>Arglist
|
— none |
Returns
List
Throws
Cannot execute
unstringifyon non-list#{$list}.
Requires
-
[function]
is-list -
[function]
is-arglist -
[function]
is-string -
[function]
cast-string -
[function]
first
joins
@function joins($lists...) { ... }
Description
Joins multile lists together into one list
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$lists
|
Multiple lists |
Arglist
|
— none |
Returns
List
Throws
Cannot execute
joinswith non-list#{first($lists)}.Cannot execute
joinswith non-list#{$list}.
Requires
-
[function]
is-null -
[function]
is-list -
[function]
is-arglist -
[function]
first
sum
@function sum($list, $ignorant: false) { ... }
Description
Sums all numeric values in a list, ignoring non-numeric values
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$list
|
Some list containing numeric values |
List</code> or <code>Arglist
|
— none |
$ignorant
|
Whether units should be ignored and subsequently stripped |
Boolean
|
|
Returns
Number
— Returns sum of all numeric values or 0 otherwise
Throws
Cannot execute
sumon non-list#{$list}.Function
range-alphaexpectstrueorfalsefor argument$ignorantbut#{$ignorant}was given.
Requires
-
[function]
contains -
[function]
is-number -
[function]
is-list -
[function]
is-arglist -
[function]
is-string -
[function]
is-null -
[function]
str-is-number -
[function]
stringify -
[function]
cast-number -
[function]
strip-unit -
[function]
extract-unit
avg
@function avg($list, $ignorant: false) { ... }
Description
Averages all numeric values in a list, ignoring non-numeric values
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$list
|
Some list containing numeric values |
List</code> or <code>Arglist
|
— none |
$ignorant
|
Whether units should be ignored and subsequently stripped |
Boolean
|
|
Returns
Number or Null
— Returns average of all numeric values or null otherwise
Throws
Cannot execute
avgon non-list#{$list}.Function
range-alphaexpectstrueorfalsefor argument$ignorantbut#{$ignorant}was given.
Requires
-
[function]
contains -
[function]
is-string -
[function]
is-NaN -
[function]
is-list -
[function]
is-arglist -
[function]
is-number -
[function]
str-is-number -
[function]
cast-number -
[function]
strip-unit -
[function]
extract-unit -
[function]
is-null
sort
@function sort($list) { ... }
Description
Sorts a list
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$list
|
Some list to be sorted |
List</code> or <code>Arglist
|
— none |
Returns
List
Throws
Cannot execute
sorton non-list#{$list}.
Requires
-
[function]
char-at -
[function]
char-at -
[function]
is-list -
[function]
is-arglist -
[function]
insert-nth -
[function]
is-number -
[function]
cast-string -
[variable]
brandy-sort-order
walk
@function walk($list) { ... }
Description
Applies a function to every item within the list
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$list
|
Some list |
List</code> or <code>Arglist
|
— none |
Returns
List
Throws
Cannot execute
walkon non-list#{$list}.Function
walkexpects a string for argument$functionbut#{type-of($function)}was given.Cannot execute
walkdue to invalid function#{$function}.
Requires
-
[function]
is-list -
[function]
is-arglist -
[function]
is-string
head
@function head($list) { ... }
Description
Retrieves all items from a list except for the last
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$list
|
Some list |
List</code> or <code>Arglist
|
— none |
Returns
List
Throws
Cannot execute
headon non-list#{$list}.
Requires
-
[function]
is-list -
[function]
is-arglist -
[function]
slice
Used by
-
[function]
cast-list -
[mixin]
linear-gradient -
[mixin]
layered-linear-gradient -
[mixin]
radial-gradient -
[mixin]
layered-radial-gradient
tail
@function tail($list) { ... }
Description
Retrieves all items from a list except for the first
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$list
|
Some list |
List</code> or <code>Arglist
|
— none |
Returns
List
Throws
Cannot execute
tailon non-list#{$list}.
Requires
-
[function]
is-list -
[function]
is-arglist -
[function]
slice
Used by
-
[function]
cast-map -
[mixin]
stripes -
[mixin]
n-stripes -
[mixin]
google-font
flatten
@function flatten($|, $limit, $level) { ... }
Description
Flattens a list with any nested lists to a single level
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$|
|
arglist $list - Some list to be flattened |
List
|
— none |
$limit
|
Limits the number of list levels that should be flattened or |
Number
|
— none |
$level
|
The nesting level of the current list, used for recursion |
Number
|
— none |
Returns
List
Throws
Cannot execute
flattenon non-list#{$list}.Function
flattenexpects a number for argument$limitbut#{type-of($limit)}was given.Function
flattenexpects a number for argument$levelbut#{type-of($level)}was given.
Requires
-
[function]
is-list -
[function]
is-arglist -
[function]
is-number
Used by
-
[function]
aeq -
[function]
aeq -
[function]
matrix-shuffle
Maps
functions
map-deep-get
@function map-deep-get($map, $key) { ... }
Description
Retrieves a property value from a nested map
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$map
|
Some nested map |
Map
|
— none |
$key
|
A dot-delimited map property |
String
|
— none |
Returns
Mixed
Throws
Cannot execute
map-deep-geton non-map #{$map}.
Requires
Used by
-
[function]
config -
[function]
const -
[function]
color -
[function]
font -
[function]
screen -
[function]
z -
[function]
build-media
Author
Hugo Giraudel
map-deep-set
@function map-deep-set($map, $key, $value) { ... }
Description
Sets a property value in a nested map
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$map
|
Some nested map |
Map
|
— none |
$key
|
A dot-delimited map property |
String
|
— none |
$value
|
Some value |
Mixed
|
— none |
Returns
Map
Throws
Cannot execute
map-deep-seton non-map #{$map}.Function
map-deep-setexpects a string for argument$keybut#{type-of($key)}was given.Cannot execute
map-deep-setsince key#{$key}does not exist at level #{$level} in map.
Requires
-
[function]
is-null -
[function]
is-map -
[function]
is-string -
[function]
str-split -
[function]
first -
[function]
last
Used by
Author
Hugo Giraudel
map-depth
@function map-depth($map) { ... }
Description
Determines the depth of a map
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$map
|
Some map |
Map
|
— none |
Returns
Number
Throws
Cannot execute
map-depthon non-map #{$map}.
Requires
-
[function]
is-map
Author
Hugo Giraudel
map-has-keys
@function map-has-keys($map, $keys) { ... }
Description
Determines whether or not a map contains the one or more keys using dot-delimited syntax for keys
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$map
|
Some nested map |
Map
|
— none |
$keys
|
A list of dot-delimited map properties to be searched for |
String
|
— none |
Returns
Boolean
Throws
Cannot execute
map-has-keyson non-map #{$map}.
Requires
-
[function]
str-split -
[function]
first -
[function]
last -
[function]
is-map -
[function]
is-list -
[function]
is-empty
Used by
-
[function]
config -
[function]
const -
[function]
font -
[function]
screen -
[function]
z -
[mixin]
config -
[mixin]
const -
[mixin]
color -
[mixin]
font -
[mixin]
screen -
[mixin]
z -
[function]
is-sprite
Author
Hugo Giraudel
map-combine
@function map-combine($keys, $values) { ... }
Description
Combines a list of keys and a list of values as a map
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$keys
|
A list of keys |
List
|
— none |
$values
|
A list of values |
List
|
— none |
Returns
Map
Throws
Function
map-combineexpects a list for argument$keysbut#{type-of($keys)}was given.Function
map-combineexpects a list for argument$valuesbut#{type-of($values)}was given.
Requires
-
[function]
is-list
Author
Hugo Giraudel
map-extend
@function map-extend($map, $maps..., $shallow: false) { ... }
Description
Inspired by jQuery, enables a map to be extended with one or more maps with optional recursion
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$map
|
Some map to be extended |
Map
|
— none |
$maps
|
Additional maps to be used to extend the first map |
Arglist
|
— none |
$shallow
|
Passed in as the last argument, disables recursive mode |
Boolean
|
|
Returns
Map
Throws
Cannot execute
map-extendon non-map #{$map}.Cannot execute
map-extendwith non-map#{$current}.
Requires
-
[function]
is-map -
[function]
is-boolean -
[function]
last -
[function]
is-list -
[function]
is-empty
Author
Hugo Giraudel
map-set
@function map-set($map, $key, $value) { ... }
Description
A simplified version of map-merge(), directly sets a map value
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$map
|
Some map |
Map
|
— none |
$key
|
Some map property |
Mixed
|
— none |
$value
|
Some map value |
Mixed
|
— none |
Returns
Map
Throws
Cannot execute
map-seton non-map #{$map}.
Requires
Used by
-
[function]
cast-map -
[mixin]
scale-font -
[function]
map-flatten -
[function]
matrix-size -
[function]
matrix-size -
[function]
build-media -
[function]
sprite-set-url -
[function]
sprite-set-spacing -
[function]
sprite-set-width -
[function]
sprite-set-height -
[function]
sprite-set-size
Author
Miriam Suzanne
map-flatten
@function map-flatten($map, $delimiter: '.', $prefix: '') { ... }
Description
Flattens a nested map to a single level of depth
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$map
|
Some map |
Map
|
— none |
$delimiter
|
Delimits previously nested map levels |
String
|
|
$prefix
|
A prefix to be added to keys at the first map level, used for recursion |
String
|
|
Returns
Map
Throws
Cannot execute
map-flattenon non-map #{$map}.Function
map-flattenexpects a string for argument$delimiterbut#{type-of($delimiter)}was given.Function
map-flattenexpects a string for argument$prefixbut#{type-of($prefix)}was given.
Requires
Math
functions
deg-to-rad
@function deg-to-rad($degree, $unit: true) { ... }
Description
Converts degrees to radians
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$degree
|
Some degree(s) to be converted |
Number
|
— none |
$unit
|
Whether units should be included |
Boolean
|
|
Returns
Number
Requires
-
[function]
strip-unit -
[function]
const -
[variable]
brandy-const-map
Used by
-
[function]
unitless-rad
Author
Takeru Suzuki
rad-to-deg
@function rad-to-deg($radian, $unit: true) { ... }
Description
Converts radians to degrees
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$radian
|
Some randian(s) to be converted |
Number
|
— none |
$unit
|
Whether units should be included |
Boolean
|
|
Returns
Number
Requires
-
[function]
strip-unit -
[function]
const -
[variable]
brandy-const-map
Author
Takeru Suzuki
unitless-rad
@function unitless-rad($angle) { ... }
Description
Converts radians to be unitless
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$angle
|
Some radian angle |
Number
|
— none |
Returns
Number or Mixed
Throws
'Angle
#{$angle}is not a valid number forunitless-rad.'
Requires
-
[function]
is-string -
[function]
deg-to-rad -
[function]
extract-unit -
[function]
is-number -
[function]
str-is-number -
[function]
cast-number
Used by
Author
Takeru Suzuki
acos
@function acos($x) { ... }
Description
Calculates the arccosine of a number
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$x
|
Some number between -1 and 1 |
Number
|
— none |
Returns
Number
Example
acos(0.1) // 1.47063
acos(-1) // 3.14159
Throws
'Argument for
acosmust be a number between -1 and 1.'
Requires
-
[function]
const -
[variable]
brandy-const-map -
[function]
asin
Author
Takeru Suzuki
asin
@function asin($x) { ... }
Description
Calculates the arcsine of a number
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$x
|
Some number between -1 and 1 |
Number
|
— none |
Returns
Number
Example
asin(0.1) // 0.10017
asin(-1) // -1.5708
Throws
'Argument for
asinmust be a number between -1 and 1.'
Requires
Used by
-
[function]
acos
Author
Takeru Suzuki
atan
@function atan($x) { ... }
Description
Calculates the arctangent of a number
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$x
|
Some number |
Number
|
— none |
Returns
Number
Example
atan(0.1) // 0.09967
atan(-1) // -0.7854
Requires
-
[function]
const -
[variable]
brandy-const-map -
[function]
sq
Used by
Author
Takeru Suzuki
atanq
@function atanq($y, $x) { ... }
Description
Calculates the arctangent of the quotient of the given arguments
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$y
|
Some number |
Number
|
— none |
$x
|
Some number |
Number
|
— none |
Returns
Number
Example
atanq(0, 0) // -3.14159
atanq(0, -0.0) // -3.14159
atanq(-0.0, 0) // -3.14159
atanq(-0.0, -0.0) // -3.14159
atanq(0, 1) // 0
atanq(0, -1) // 3.14159
Requires
-
[function]
const -
[variable]
brandy-const-map -
[function]
atan -
[function]
is-NaN
Author
Takeru Suzuki
cos
@function cos($x) { ... }
Description
Calculates the cosine of a number
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$x
|
Some number in radians or degress, assuming radians are unitless |
Number
|
— none |
Returns
Number
Example
cos(0.7854) // 0.70711
cos(45deg) // 0.70711
Requires
-
[function]
const -
[variable]
brandy-const-map -
[function]
unitless-rad -
[function]
sq
Used by
Author
Takeru Suzuki
cot
@function cot($x) { ... }
Description
Calculates the cotangent of a number
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$x
|
Some number in radians or degress, assuming radians are unitless |
Number
|
— none |
Returns
Number
Example
cot(0.5236) // 1.73205
cot(30deg) // 1.73205
Requires
-
[function]
unitless-rad -
[function]
tan
Author
Takeru Suzuki
csc
@function csc($x) { ... }
Description
Calculates the cosecant of a number
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$x
|
Some number in radians or degress, assuming radians are unitless |
Number
|
— none |
Returns
Number
Example
csc(1.0472) // 1.1547
csc(60deg) // 1.1547
Requires
-
[function]
unitless-rad -
[function]
sin
Author
Takeru Suzuki
exp
@function exp($x) { ... }
Description
Calculates E^x, where x is the argument and E is Euler's constant, the base of the natural logarithms
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$x
|
— none |
Number
|
— none |
Example
exp(1) // 2.71828
exp(-1) // 0.36788
Requires
-
[function]
const -
[variable]
brandy-const-map -
[function]
pow
Author
Takeru Suzuki
fact
@function fact($x) { ... }
Description
Calculates the factorial of a non-negative integer
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$x
|
Some non-negative number |
Number
|
— none |
Returns
Number or Null
Example
fact(0) // 1
fact(8) // 40320
Throws
'Cannot calculate the
factof negative number#{$x}.''Cannot calculate the
factof non-integer#{$x}.'
Author
Takeru Suzuki
frexp
@function frexp($x) { ... }
Description
Returns a two-element list containing the normalized fraction and exponent of a number
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$x
|
Some number |
Number
|
— none |
Returns
List
— In the form of (fraction, exponent)
Used by
-
[function]
log
Author
Takeru Suzuki
ldexp
@function ldexp($x, $exp) { ... }
Description
Calculates $x * 2^$exp
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$x
|
Some number |
Number
|
— none |
$exp
|
Some number representing an exponent |
Number
|
— none |
Returns
Number
Used by
-
[function]
log
Author
Takeru Suzuki
log
@function log($x, $b: null) { ... }
Description
Calculates the natural logarithm of a number
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$x
|
Some number |
Number
|
— none |
$b
|
A base number |
Number</code> or <code>Null
|
|
Returns
Number
Example
log(2) // 0.69315
log(10) // 2.30259
log(2, 10) // 0.30103
Requires
-
[function]
sqrt -
[function]
frexp -
[function]
ldexp -
[function]
const -
[variable]
brandy-const-map -
[function]
is-null -
[function]
sq
Used by
-
[function]
pow
Author
Takeru Suzuki
pow
@function pow($base, $exp: 1) { ... }
Description
Calculates the base raised to the exponent power
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$base
|
The base number |
Number
|
— none |
$exp
|
The exponent number |
Number
|
|
Returns
Number
Example
pow(4, 2) // 16
pow(4, -2) // 0.0625
pow(4, 0.2) // 1.31951
Requires
-
[function]
log
Used by
Author
Takeru Suzuki
sq
@function sq($base) { ... }
Description
Calculates the base raised to the exponent 2 (squared)
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$base
|
The base number |
Number
|
— none |
Returns
Number
Example
sq(4) // 16
sq(2) // 4
sq(1) // 1
Requires
-
[function]
pow
Used by
Author
Takeru Suzuki
cu
@function cu($base) { ... }
Description
Calculates the base raised to the exponent 3 (cubed)
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$base
|
The base number |
Number
|
— none |
Returns
Number
Example
cu(4) // 64
cu(2) // 8
cu(1) // 1
Requires
-
[function]
pow
Author
Takeru Suzuki
sec
@function sec($x) { ... }
Description
Calculates the secant of a number
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$x
|
Some number in radians or degress, assuming radians are unitless |
Number
|
— none |
Returns
Number
Example
sec(0.7854) // 1.41422
sec(45deg) // 1.41422
Requires
-
[function]
unitless-rad -
[function]
cos
Author
Takeru Suzuki
sin
@function sin($x) { ... }
Description
Calculates the sine of a number
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$x
|
Some number in radians or degress, assuming radians are unitless |
Number
|
— none |
Returns
Number
Example
sin(1.0472) // 0.86603
sin(60deg) // 0.86603
Requires
-
[function]
unitless-rad -
[function]
cos -
[function]
const -
[variable]
brandy-const-map
Used by
Author
Takeru Suzuki
tan
@function tan($x) { ... }
Description
Calculates the tangent of a number
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$x
|
Some number in radians or degress, assuming radians are unitless |
Number
|
— none |
Returns
Number
Example
tan(0.5236) // 0.57735
tan(30deg) // 0.57735
Requires
-
[function]
unitless-rad -
[function]
cos -
[function]
sin
Used by
-
[function]
cot
Author
Takeru Suzuki
sqrt
@function sqrt($x) { ... }
Description
Calculates the square root of a number
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$x
|
Some number |
Number
|
— none |
Returns
Number or Null
Example
sqrt(2) // 1.41421
sqrt(5) // 2.23607
Throws
'Cannot calculate
sqrtof negative number#{$x}.'
Requires
-
[function]
sq
Used by
Author
Takeru Suzuki
Matrices
functions
matrix
@function matrix($rows, $columns) { ... }
Description
Create an empty matrix using 0 as a placeholder value
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$rows
|
The desired number of rows |
Number
|
— none |
$columns
|
The desired number of columns |
Number
|
— none |
Returns
List
Throws
Function
matrixexpects a number for argument$rowsbut #{type-of($rows)} was given.Function
matrixexpects a number for argument$columnsbut #{type-of($columns)} was given.
Requires
-
[function]
is-number
matrix-from
@function matrix-from($rows, $values, $square: true) { ... }
Description
Creates a matrix from a given list of values, optionally made square for uneven lists using 0 as a placeholder value
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$rows
|
The desired number of rows |
Number
|
— none |
$values
|
The list of values to be used |
List
|
— none |
$square
|
Whether the matrix should be filled with placeholder value |
Boolean
|
|
Throws
Function
matrix-fromexpects a number for argument$rowsbut#{type-of($rows)}was given.Function
matrix-fromexpects a list for argument$valuesbut#{type-of($values)}was given.Function
matrix-fromexpectstrueorfalsefor argument$squarebut#{$square}was given.
Requires
Used by
-
[function]
matrix-shuffle -
[function]
sprite
matrix-rows
@function matrix-rows($matrix) { ... }
Description
Counts the number rows in a matrix
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$matrix
|
Some matrix |
Matrix
|
— none |
Returns
Number
Throws
Cannot count
matrix-rowson non-matrix#{$matrix}.
Requires
-
[function]
is-matrix
Used by
-
[function]
matrix-has-coords -
[function]
matrix-replace-column -
[function]
matrix-shuffle
matrix-columns
@function matrix-columns($matrix, $max: true) { ... }
Description
Counts the number of columns in a matrix
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$matrix
|
Some matrix |
Matrix
|
— none |
$max
|
Whether to return the maximum or minimum number of columns within the matrix |
Boolean
|
|
Returns
Number
Throws
Cannot count
matrix-columnson non-matrix#{$matrix}.Function
matrix-columnsexpectstrueorfalsefor argument$maxbut#{$max}was given.
Requires
Used by
-
[function]
matrix-has-coords -
[function]
matrix-replace-row -
[function]
matrix-is-square -
[function]
matrix-is-square
matrix-size
@function matrix-size($matrix) { ... }
Description
Counts the number of rows and columns in a matrix
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$matrix
|
Some matrix |
Matrix
|
— none |
Returns
Map
— In the form of (rows: 0, columns: 0)
Throws
Cannot execute
matrix-sizeon non-matrix#{$matrix}.
Requires
matrix-has-coords
@function matrix-has-coords($matrix, $coordinates) { ... }
Description
Determines if a matrix has the given coordinates
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$matrix
|
Some matrix |
Matrix
|
— none |
$coordinates
|
A set of matrix coordinates where the |
List
|
— none |
Returns
Boolean
Throws
Cannot execute
matrix-has-coordson non-matrix#{$matrix}.
Requires
-
[function]
is-matrix -
[function]
first -
[function]
last -
[function]
matrix-rows -
[function]
matrix-columns
matrix-set
@function matrix-set($matrix, $coordinates) { ... }
Description
Sets a value within a matrix
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$matrix
|
Some matrix |
Matrix
|
— none |
$coordinates
|
A set of matrix coordinates where the |
List
|
— none |
Returns
Matrix
Throws
Cannot execute
matrix-seton non-matrix#{$matrix}.
Requires
Used by
-
[function]
matrix-set-diagonal -
[function]
matrix-set-row -
[function]
matrix-set-column -
[function]
matrix-swap -
[function]
matrix-swap -
[function]
matrix-replace
matrix-set-diagonal
@function matrix-set-diagonal($matrix, $value, $direction) { ... }
Description
Sets all values on a diagonal within a matrix
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$matrix
|
Some matrix |
Matrix
|
— none |
$value
|
One or more values to set in the given matrix |
String</code> or <code>List
|
— none |
$direction
|
Designates the starting edge relative to the top |
String
|
— none |
Returns
Matrix
Throws
Cannot execute
matrix-set-diagonalon non-matrix#{$matrix}.
Requires
-
[function]
first -
[function]
is-matrix -
[function]
is-list -
[function]
matrix-set
matrix-set-row
@function matrix-set-row($matrix, $row, $value) { ... }
Description
Sets all values on a given row with the new value
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$matrix
|
Some matrix |
Matrix
|
— none |
$row
|
The row number to be used |
Number
|
— none |
$value
|
One or more values to set in the given matrix |
String</code> or <code>List
|
— none |
Returns
Matrix
Throws
Cannot execute
matrix-set-rowon non-matrix#{$matrix}.
Requires
-
[function]
is-matrix -
[function]
is-list -
[function]
matrix-set
matrix-set-column
@function matrix-set-column($matrix, $column, $value) { ... }
Description
Sets all values on a given column with the new value
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$matrix
|
Some matrix |
Matrix
|
— none |
$column
|
The column number to be used |
Number
|
— none |
$value
|
One or more values to set in the given matrix |
String</code> or <code>List
|
— none |
Returns
Matrix
Throws
Cannot execute
matrix-set-columnon non-matrix#{$matrix}.
Requires
-
[function]
is-matrix -
[function]
is-list -
[function]
matrix-set
matrix-get
@function matrix-get($matrix, $coordinates) { ... }
Description
Gets an values from within a matrix
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$matrix
|
Some matrix |
Matrix
|
— none |
$coordinates
|
A set of matrix coordinates where the |
List
|
— none |
Returns
Mixed
Throws
Cannot execute
matrix-geton non-matrix#{$matrix}.Function
matrix-getexpects valid coordinates for argument$coordinatesbut#{$coordinates}was given.
Requires
-
[function]
first -
[function]
last -
[function]
is-matrix -
[function]
are-coords
Used by
-
[function]
matrix-swap -
[function]
matrix-swap
matrix-get-diagonal
@function matrix-get-diagonal($matrix, $direction) { ... }
Description
Gets all values on a diagonal from within the given matrix
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$matrix
|
Some matrix |
Matrix
|
— none |
$direction
|
Designates the starting edge relative to the top |
String
|
— none |
Returns
List
Throws
Cannot execute
matrix-get-diagonalon non-matrix#{$matrix}.Function
matrix-get-diagonalexpectsleftorrightfor argument$directionbut#{$direction}was given.
Requires
matrix-get-row
@function matrix-get-row($matrix, $row) { ... }
Description
Gets all values from a given row within a matrix
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$matrix
|
Some matrix |
Matrix
|
— none |
$row
|
The row number to be used |
Number
|
— none |
Returns
List
Throws
Cannot execute
matrix-get-rowon non-matrix#{$matrix}.Function
matrix-get-rowexpects a number for argument$rowbut#{$row}was given.
Requires
matrix-get-column
@function matrix-get-column($matrix, $column) { ... }
Description
Gets all values from a given column within a matrix
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$matrix
|
Some matrix |
Matrix
|
— none |
$column
|
The column number to be used |
Number
|
— none |
Returns
List
Throws
Cannot execute
matrix-get-columnon non-matrix#{$matrix}.Function
matrix-get-columnexpects a number for argument$columnbut#{$column}was given.
Requires
matrix-coords
@function matrix-coords($matrix, $value) { ... }
Description
Get the coordinates of a given value within a matrix
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$matrix
|
Some matrix |
Matrix
|
— none |
$value
|
Some value to be searched for |
Mixed
|
— none |
Returns
List
— A list of one or more cordinates in the form (row, column)
Throws
Cannot execute
matrix-coordson non-matrix#{$matrix}.Cannot execute
matrix-coordssince matrix does not contain the value#{$value}.
Requires
-
[function]
matrix-has-value -
[function]
first -
[function]
is-matrix
Used by
-
[function]
sprite-position
matrix-has-value
@function matrix-has-value($matrix, $value) { ... }
Description
Determines if a matrix has the given value
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$matrix
|
Some matrix |
Matrix
|
— none |
$value
|
Some value to be searched for |
Mixed
|
— none |
Returns
Boolean
Throws
Cannot execute
matrix-has-valueon non-matrix#{$matrix}.
Requires
-
[function]
is-matrix
Used by
-
[function]
matrix-coords -
[function]
sprite-position
matrix-swap
@function matrix-swap($matrix, $coordinates1, $coordinates2) { ... }
Description
Swaps the items for two coordinates within a matrix
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$matrix
|
Some matrix |
Matrix
|
— none |
$coordinates1
|
A set of matrix coordinates where the |
List
|
— none |
$coordinates2
|
A set of matrix coordinates where the |
List
|
— none |
Returns
Matrix
Throws
Cannot execute
matrix-swapon non-matrix#{$matrix}.Function
matrix-swapexpects valid coordinates for argument$coordinates1but#{$coordinates1}was given.Function
matrix-swapexpects valid coordinates for argument$coordinates2but#{$coordinates2}was given.
Requires
-
[function]
first -
[function]
last -
[function]
first -
[function]
last -
[function]
matrix-get -
[function]
matrix-get -
[function]
matrix-set -
[function]
matrix-set -
[function]
is-matrix -
[function]
are-coords
matrix-swap-values
@function matrix-swap-values($matrix, $value1, $value2) { ... }
Description
Swaps two values within a matrix
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$matrix
|
Some matrix |
Matrix
|
— none |
$value1
|
Some value to be swapped |
Mixed
|
— none |
$value2
|
Another value to be swapper |
Mixed
|
— none |
Returns
Matrix
Throws
Cannot execute
matrix-swap-valueson non-matrix#{$matrix}.
Requires
-
[function]
is-matrix
matrix-swap-rows
@function matrix-swap-rows($matrix, $row1, $row2) { ... }
Description
Swaps two rows within a matrix
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$matrix
|
Some matrix |
Matrix
|
— none |
$row1
|
A row number of the row to be swapped |
Number
|
— none |
$row2
|
Another row number of the row to be swapped |
Number
|
— none |
Returns
Matrix
Throws
Cannot execute
matrix-swap-rowson non-matrix#{$matrix}.Function
matrix-swap-rowsexpects a number for argument$row1but#{type-of($row1)}was given.Function
matrix-swap-rowsexpects a number for argument$row2but#{type-of($row2)}was given.
Requires
matrix-swap-columns
@function matrix-swap-columns($matrix, $column1, $column2) { ... }
Description
Swaps two columns within a matrix
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$matrix
|
Some matrix |
Matrix
|
— none |
$column1
|
A column number of the column to be swapped |
Number
|
— none |
$column2
|
Another column number of the column to be swapped |
Number
|
— none |
Returns
Matrix
Throws
Cannot execute
matrix-swap-columnson non-matrix#{$matrix}.Function
matrix-swap-columnsexpects a number for argument$column1but#{type-of($column1)}was given.Function
matrix-swap-columnsexpects a number for argument$column2but#{type-of($column2)}was given.
Requires
matrix-replace
@function matrix-replace($matrix, $old, $new) { ... }
Description
Replaces the $old value within a matrix with the $new value
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$matrix
|
Some matrix |
Matrix
|
— none |
$old
|
Some old value to be removed |
Mixed
|
— none |
$new
|
Some new value to be inserted |
Mixed
|
— none |
Returns
Matrix
Throws
Cannot execute
matrix-replaceon non-matrix#{$matrix}.
Requires
-
[function]
matrix-set -
[function]
is-matrix
matrix-replace-row
@function matrix-replace-row($matrix, $row, $new) { ... }
Description
Replaces the $row at the given index with the $new row
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$matrix
|
Some matrix |
Matrix
|
— none |
$row
|
The row number to be replaced |
Number
|
— none |
$new
|
The new row contents to be inserted |
List</code> or <code>String
|
— none |
Returns
Matrix
Throws
Cannot execute
matrix-replace-rowon non-matrix#{$matrix}.Function
matrix-replace-rowexpects a number for argument$rowbut#{type-of($row)}was given.Function
matrix-replace-rowexpects a string or list for argument$newbut#{type-of($new)}was given.
Requires
-
[function]
is-list -
[function]
is-matrix -
[function]
is-number -
[function]
is-string -
[function]
matrix-columns
matrix-replace-column
@function matrix-replace-column($matrix, $column, $new) { ... }
Description
Replaces the $column at the given index with the $new column
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$matrix
|
Some matrix |
Matrix
|
— none |
$column
|
The column number to be replaced |
Number
|
— none |
$new
|
The new column contents to be inserted |
List</code> or <code>String
|
— none |
Returns
Matrix
Throws
Cannot execute
matrix-replace-columnon non-matrix#{$matrix}.Function
matrix-replace-columnexpects a number for argument$columnbut#{type-of($column)}was given.Function
matrix-replace-columnexpects a string or list for argument$newbut#{type-of($new)}was given.
Requires
-
[function]
is-list -
[function]
is-matrix -
[function]
is-number -
[function]
is-string -
[function]
matrix-rows
matrix-shuffle
@function matrix-shuffle($matrix) { ... }
Description
Shuffles the values within a matrix
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$matrix
|
Some matrix |
Matrix
|
— none |
Returns
Matrix
Throws
Cannot execute
matrix-shuffleon non-matrix#{$matrix}.
Requires
-
[function]
matrix-rows -
[function]
matrix-is-square -
[function]
flatten -
[function]
shuffle -
[function]
matrix-from -
[function]
is-matrix
matrix-is-square
@function matrix-is-square($matrix) { ... }
Description
Determines if a matrix has an equal number of columns on all rows
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$matrix
|
Some matrix |
Matrix
|
— none |
Returns
Boolean
Throws
Cannot execute
matrix-is-squareon non-matrix#{$matrix}.
Requires
-
[function]
matrix-columns -
[function]
matrix-columns -
[function]
is-matrix
Used by
-
[function]
matrix-shuffle
matrix-is-diagonal
@function matrix-is-diagonal($matrix, $direction) { ... }
Description
Determines if a matrix has all values set in a diagonal while all other values are equal to 0
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$matrix
|
Some matrix |
Matrix
|
— none |
$direction
|
Designates the starting edge relative to the top |
String
|
— none |
Returns
Boolean
Throws
Cannot execute
matrix-is-diagonalon non-matrix#{$matrix}.Function
matrix-is-diagonalexpectsleftorrightfor argument$directionbut#{$direction}was given.
Requires
matrix-is-upper-triangular
@function matrix-is-upper-triangular($matrix, $direction) { ... }
Description
Determines if a matrix has all values above its diagonal set while all other values are equal to 0
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$matrix
|
Some matrix |
Matrix
|
— none |
$direction
|
Designates the starting edge relative to the top |
String
|
— none |
Returns
Boolean
Throws
Cannot execute
matrix-is-upper-triangularon non-matrix#{$matrix}.Function
matrix-is-upper-triangularexpectsleftorrightfor argument$directionbut#{$direction}was given.
Requires
matrix-is-lower-triangular
@function matrix-is-lower-triangular($matrix, $direction) { ... }
Description
Determines if a matrix has all values below its diagonal set while all other values are equal to 0
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$matrix
|
Some matrix |
Matrix
|
— none |
$direction
|
Designates the starting edge relative to the top |
String
|
— none |
Returns
Boolean
Throws
Cannot execute
matrix-is-lower-triangularon non-matrix#{$matrix}.Function
matrix-is-lower-triangularexpectsleftorrightfor argument$directionbut#{$direction}was given.
Requires
matrix-print
@function matrix-print($matrix) { ... }
Description
Pretty prints a matrix as a string
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$matrix
|
Some matrix |
Matrix
|
— none |
Throws
Cannot execute
matrix-printon non-matrix#{$matrix}.
Requires
-
[function]
is-matrix
Used by
-
[mixin]
matrix-print
are-coords
@function are-coords($coordinates) { ... }
Description
Determines if a set of given coordinates are valid
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$coordinates
|
A set of matrix coordinates where the |
List
|
— none |
Returns
Boolean
Requires
Used by
-
[function]
matrix-get -
[function]
matrix-swap
mixins
matrix-print
@mixin matrix-print($matrix) { ... }
Description
Outputs the contents of a matrix to the debugging window
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$matrix
|
Some matrix |
Matrix
|
— none |
Throws
Cannot execute
matrix-printon non-matrix#{$matrix}.
Requires
-
[function]
is-matrix -
[function]
matrix-print
Numbers
functions
unit-to-digit
@function unit-to-digit($unit) { ... }
Description
Converts some string representation of a unit to its numeric digit
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$unit
|
Some string representation of a unit |
String
|
— none |
Returns
Number
Requires
-
[variable]
brandy-units -
[variable]
brandy-units
Used by
-
[function]
cast-number -
[mixin]
grid -
[function]
range-min-max -
[function]
is-negative -
[function]
is-positive
convert-unit
@function convert-unit($value, $value, $base: $brandy-font-size) { ... }
Description
Converts one numerical unit to another
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$value
|
Some numeric value |
String</code> or <code>Number
|
— none |
$value
|
Some unit |
String
|
— none |
$base
|
The base size in |
Number
|
|
Returns
Number or Null
Throws
Cannot
convert-unitwhen value#{$value}is non-numeric.Cannot
convert-unitfor invalid unit#{$unit}.
Requires
-
[function]
is-string -
[function]
str-is-number -
[function]
cast-number -
[function]
is-number -
[function]
strip-unit -
[function]
contains -
[variable]
brandy-units -
[variable]
brandy-font-size
Used by
-
[function]
px -
[function]
pt -
[function]
pc -
[function]
in -
[function]
mm -
[function]
cm -
[function]
deg -
[function]
rad -
[function]
grad -
[function]
turn -
[function]
dpi -
[function]
dpcm -
[function]
dppx -
[function]
ms -
[function]
s -
[function]
hz -
[function]
khz -
[function]
rem -
[function]
em -
[function]
ex -
[function]
ch -
[function]
vw -
[function]
vh -
[function]
vmin -
[function]
vmax -
[function]
decimal-round -
[function]
decimal-ceil -
[function]
decimal-floor
Author
Jakob Eriksen
strip-unit
@function strip-unit($value) { ... }
Description
Strips a unit from a numeric value
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$value
|
Some numeric value |
String</code> or <code>Number
|
— none |
Returns
Number or Null
Throws
'Cannot execute
strip-unitwhen value#{$value}is non-numeric.'
Requires
-
[function]
is-string -
[function]
str-is-number -
[function]
cast-number -
[function]
is-number
Used by
-
[function]
range -
[function]
range-min-max -
[function]
sum -
[function]
avg -
[function]
deg-to-rad -
[function]
rad-to-deg -
[function]
convert-unit -
[function]
is-zero -
[function]
is-even -
[function]
is-odd -
[function]
em -
[function]
numeric-scale
is-negative
@function is-negative($value) { ... }
Description
Determines if a value is equivalent to a negative number
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$value
|
Some numeric value |
Mixed
|
— none |
Returns
Boolean
Requires
-
[function]
extract-unit -
[function]
is-number -
[function]
is-string -
[function]
unit-to-digit -
[function]
str-is-number -
[function]
str-first
Used by
-
[function]
cast-number -
[function]
slice -
[function]
str-is-number
is-positive
@function is-positive($value) { ... }
Description
Determines if a value is equivalent to a positive number
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$value
|
Some numeric value |
Mixed
|
— none |
Returns
Boolean
Requires
-
[function]
extract-unit -
[function]
is-number -
[function]
is-string -
[function]
unit-to-digit -
[function]
str-is-number
Used by
-
[function]
inverse
is-zero
@function is-zero($value) { ... }
Description
Determines if a value is equal to zero
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$value
|
Some numeric value |
Mixed
|
— none |
Returns
Boolean
Requires
-
[function]
is-number -
[function]
is-string -
[function]
str-is-number -
[function]
strip-unit -
[function]
cast-number
extract-unit
@function extract-unit($value) { ... }
Description
Extracts the units from a numeric value
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$value
|
Some numeric value |
Mixed
|
— none |
Returns
String or Null
Throws
'Value
#{$value}is non-numeric forextract-unit.'
Requires
-
[function]
is-string -
[function]
is-number -
[function]
str-is-number -
[function]
cast-number
Used by
-
[function]
range-min-max -
[function]
sum -
[function]
avg -
[function]
unitless-rad -
[function]
is-negative -
[function]
is-positive
is-percentage
(aliased as
is-percent
)
@function is-percentage($value) { ... }
Description
Determines if a number is a percentage
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$value
|
Some value |
Mixed
|
— none |
Returns
Boolean
Requires
-
[function]
is-number -
[function]
is-string -
[function]
str-is-number -
[function]
cast-number
Used by
-
[function]
cmyk -
[function]
cmyk -
[function]
cmyk -
[function]
cmyk -
[function]
tint -
[function]
shade -
[function]
tone -
[function]
color-tints -
[function]
color-shades -
[function]
color-tones -
[mixin]
aspect-ratio -
[function]
is-percent -
[function]
is-position
is-percent
(alias for is-percentage)
@function is-percent($value) { ... }
Refer to is-percentage.
is-even
@function is-even($value) { ... }
Description
Determines if a number is even
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$value
|
Some value |
Mixed
|
— none |
Returns
Boolean
Requires
-
[function]
strip-unit -
[function]
is-number -
[function]
is-string -
[function]
str-is-number -
[function]
cast-number
is-odd
@function is-odd($value) { ... }
Description
Determines if a number is odd
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$value
|
Some value |
Mixed
|
— none |
Returns
Boolean
Requires
-
[function]
strip-unit -
[function]
is-number -
[function]
is-string -
[function]
str-is-number -
[function]
cast-number
is-integer
@function is-integer($value) { ... }
Description
Determines if a number is an integer
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$value
|
Some value |
Mixed
|
— none |
Returns
Boolean
Requires
-
[function]
is-number -
[function]
is-string -
[function]
str-is-number -
[function]
cast-number
Used by
-
[mixin]
n-stripes
is-float
@function is-float($value) { ... }
Description
Determines if a number is a float
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$value
|
Some value |
Mixed
|
— none |
Returns
Boolean
Requires
-
[function]
is-number -
[function]
is-string -
[function]
str-is-number -
[function]
cast-number
Used by
-
[function]
cmyk -
[function]
decimal-round -
[function]
decimal-ceil -
[function]
decimal-floor -
[function]
ratio -
[function]
fraction
is-angle
@function is-angle($value) { ... }
Description
Determines if a number is an angle
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$value
|
Some value |
Mixed
|
— none |
Returns
Boolean
Requires
-
[function]
is-number -
[function]
contains -
[function]
is-string -
[function]
str-is-number -
[function]
cast-number
Used by
is-frequency
@function is-frequency($value) { ... }
Description
Determines if a number is an angle
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$value
|
Some value |
Mixed
|
— none |
Returns
Boolean
Requires
-
[function]
contains -
[function]
is-number -
[function]
is-string -
[function]
str-is-number -
[function]
cast-number
is-relative-length
@function is-relative-length($value) { ... }
Description
Determines if a number is a relative length
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$value
|
Some value |
Mixed
|
— none |
Returns
Boolean
Requires
-
[function]
is-number -
[function]
contains -
[function]
is-string -
[function]
str-is-number -
[function]
cast-number
Used by
-
[function]
is-length
is-absolute-length
@function is-absolute-length($value) { ... }
Description
Determines if a number is an absolute length
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$value
|
Some value |
Mixed
|
— none |
Returns
Boolean
Requires
-
[function]
is-number -
[function]
contains -
[function]
is-string -
[function]
str-is-number -
[function]
cast-number
Used by
-
[function]
is-length
is-length
@function is-length($value) { ... }
Description
Determines if a number is a length
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$value
|
Some value |
Mixed
|
— none |
Returns
Boolean
Requires
-
[function]
is-relative-length -
[function]
is-absolute-length
Used by
-
[function]
build-media -
[function]
is-position
is-resolution
@function is-resolution($value) { ... }
Description
Determines if a number is a resolution
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$value
|
Some value |
Mixed
|
— none |
Returns
Boolean
Requires
-
[function]
is-number -
[function]
contains -
[function]
is-string -
[function]
str-is-number -
[function]
cast-number
Used by
-
[function]
build-media
is-time
(aliased as
is-duration
)
@function is-time($value) { ... }
Description
Determines whether some value is a time
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$value
|
Some value |
Mixed
|
— none |
Returns
Boolean
Requires
-
[function]
is-number -
[function]
contains -
[function]
is-string -
[function]
str-is-number -
[function]
cast-number
Used by
-
[function]
is-duration
is-duration
(alias for is-time)
@function is-duration($value) { ... }
Refer to is-time.
is-NaN
@function is-NaN($value) { ... }
Description
Determines whether some value is equal to NaN
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$value
|
Some value |
Mixed
|
— none |
Returns
Boolean
Requires
-
[function]
is-number -
[function]
cast-string
Used by
-
[function]
cast-boolean -
[function]
avg -
[function]
atanq
inverse
@function inverse($number) { ... }
Description
Inverts the sign of a number
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$number
|
Some number to invert |
Number
|
— none |
Returns
Number
Throws
Cannot execute
inversewith non-number#{$number}.
Requires
-
[function]
is-positive -
[function]
is-number -
[function]
is-string -
[function]
str-is-number -
[function]
cast-number
Author
Jason Nickel
px
@function px($value, $base: $brandy-font-size) { ... }
Description
Converts some numeric value to its px equivalent
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$value
|
Some value to convert |
Number
|
— none |
$base
|
The base size in |
Number
|
|
Returns
Number
Throws
Function
pxexpects a number for argument$valuebut#{type-of($value)}was given.Function
pxexpects a number for argument$basebut#{type-of($base)}was given.Function
pxexpects somepxvalue for argument$basebut#{$base}was given.
Requires
-
[function]
is-number -
[function]
convert-unit -
[function]
is-string -
[function]
str-is-number -
[function]
cast-number -
[variable]
brandy-font-size
Author
Jakob Eriksen
pt
@function pt($value, $base: $brandy-font-size) { ... }
Description
Converts some numeric value to its pt equivalent
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$value
|
Some value to convert |
Number
|
— none |
$base
|
The base size in |
Number
|
|
Returns
Number
Throws
Function
ptexpects a number for argument$valuebut#{type-of($value)}was given.Function
ptexpects a number for argument$basebut#{type-of($base)}was given.Function
ptexpects somepxvalue for argument$basebut#{$base}was given.
Requires
-
[function]
is-number -
[function]
is-number -
[function]
convert-unit -
[function]
is-string -
[function]
str-is-number -
[function]
cast-number -
[variable]
brandy-font-size
Authors
Jakob Eriksen
{function} is-number
pc
@function pc($value, $base: $brandy-font-size) { ... }
Description
Converts some numeric value to its pc equivalent
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$value
|
Some value to convert |
Number
|
— none |
$base
|
The base size in |
Number
|
|
Returns
Number
Throws
Function
pcexpects a number for argument$valuebut#{type-of($value)}was given.Function
pcexpects a number for argument$basebut#{type-of($base)}was given.Function
pcexpects somepxvalue for argument$basebut#{$base}was given.
Requires
-
[function]
is-number -
[function]
convert-unit -
[function]
is-string -
[function]
str-is-number -
[function]
cast-number -
[variable]
brandy-font-size
Author
Jakob Eriksen
in
@function in($value, $base: $brandy-font-size) { ... }
Description
Converts some numeric value to its in equivalent
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$value
|
Some value to convert |
Number
|
— none |
$base
|
The base size in |
Number
|
|
Returns
Number
Throws
Function
inexpects a number for argument$valuebut#{type-of($value)}was given.Function
inexpects a number for argument$basebut#{type-of($base)}was given.Function
inexpects somepxvalue for argument$basebut#{$base}was given.
Requires
-
[function]
is-number -
[function]
convert-unit -
[function]
is-string -
[function]
str-is-number -
[function]
cast-number -
[variable]
brandy-font-size
Author
Jakob Eriksen
mm
@function mm($value, $base: $brandy-font-size) { ... }
Description
Converts some numeric value to its mm equivalent
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$value
|
Some value to convert |
Number
|
— none |
$base
|
The base size in |
Number
|
|
Returns
Number
Throws
Function
mmexpects a number for argument$valuebut#{type-of($value)}was given.Function
mmexpects a number for argument$basebut#{type-of($base)}was given.Function
mmexpects somepxvalue for argument$basebut#{$base}was given.
Requires
-
[function]
is-number -
[function]
convert-unit -
[function]
is-string -
[function]
str-is-number -
[function]
cast-number -
[variable]
brandy-font-size
Author
Jakob Eriksen
cm
@function cm($value, $base: $brandy-font-size) { ... }
Description
Converts some numeric value to its cm equivalent
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$value
|
Some value to convert |
Number
|
— none |
$base
|
The base size in |
Number
|
|
Returns
Number
Throws
Function
cmexpects a number for argument$valuebut#{type-of($value)}was given.Function
cmexpects a number for argument$basebut#{type-of($base)}was given.Function
cmexpects somepxvalue for argument$basebut#{$base}was given.
Requires
-
[function]
is-number -
[function]
convert-unit -
[function]
is-string -
[function]
str-is-number -
[function]
cast-number -
[variable]
brandy-font-size
Author
Jakob Eriksen
deg
@function deg($value, $base: $brandy-font-size) { ... }
Description
Converts some numeric value to its deg equivalent
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$value
|
Some value to convert |
Number
|
— none |
$base
|
The base size in |
Number
|
|
Returns
Number
Throws
Function
degexpects a number for argument$valuebut#{type-of($value)}was given.Function
degexpects a number for argument$basebut#{type-of($base)}was given.Function
degexpects somepxvalue for argument$basebut#{$base}was given.
Requires
-
[function]
is-number -
[function]
convert-unit -
[function]
is-string -
[function]
str-is-number -
[function]
cast-number -
[variable]
brandy-font-size
Author
Jakob Eriksen
rad
@function rad($value, $base: $brandy-font-size) { ... }
Description
Converts some numeric value to its rad equivalent
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$value
|
Some value to convert |
Number
|
— none |
$base
|
The base size in |
Number
|
|
Returns
Number
Throws
Function
radexpects a number for argument$valuebut#{type-of($value)}was given.Function
radexpects a number for argument$basebut#{type-of($base)}was given.Function
radexpects somepxvalue for argument$basebut#{$base}was given.
Requires
-
[function]
is-number -
[function]
convert-unit -
[function]
is-string -
[function]
str-is-number -
[function]
cast-number -
[variable]
brandy-font-size
Author
Jakob Eriksen
grad
@function grad($value, $base: $brandy-font-size) { ... }
Description
Converts some numeric value to its grad equivalent
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$value
|
Some value to convert |
Number
|
— none |
$base
|
The base size in |
Number
|
|
Returns
Number
Throws
Function
gradexpects a number for argument$valuebut#{type-of($value)}was given.Function
gradexpects a number for argument$basebut#{type-of($base)}was given.Function
gradexpects somepxvalue for argument$basebut#{$base}was given.
Requires
-
[function]
is-number -
[function]
convert-unit -
[function]
is-string -
[function]
str-is-number -
[function]
cast-number -
[variable]
brandy-font-size
Author
Jakob Eriksen
turn
@function turn($value, $base: $brandy-font-size) { ... }
Description
Converts some numeric value to its turn equivalent
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$value
|
Some value to convert |
Number
|
— none |
$base
|
The base size in |
Number
|
|
Returns
Number
Throws
Function
turnexpects a number for argument$valuebut#{type-of($value)}was given.Function
turnexpects a number for argument$basebut#{type-of($base)}was given.Function
turnexpects somepxvalue for argument$basebut#{$base}was given.
Requires
-
[function]
is-number -
[function]
convert-unit -
[function]
is-string -
[function]
str-is-number -
[function]
cast-number -
[variable]
brandy-font-size
Author
Jakob Eriksen
dpi
@function dpi($value, $base: $brandy-font-size) { ... }
Description
Converts some numeric value to its dpi equivalent
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$value
|
Some value to convert |
Number
|
— none |
$base
|
The base size in |
Number
|
|
Returns
Number
Throws
Function
dpiexpects a number for argument$valuebut#{type-of($value)}was given.Function
dpiexpects a number for argument$basebut#{type-of($base)}was given.Function
dpiexpects somepxvalue for argument$basebut#{$base}was given.
Requires
-
[function]
is-number -
[function]
convert-unit -
[function]
is-string -
[function]
str-is-number -
[function]
cast-number -
[variable]
brandy-font-size
Author
Jakob Eriksen
dpcm
@function dpcm($value, $base: $brandy-font-size) { ... }
Description
Converts some numeric value to its dpcm equivalent
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$value
|
Some value to convert |
Number
|
— none |
$base
|
The base size in |
Number
|
|
Returns
Number
Throws
Function
dpcmexpects a number for argument$valuebut#{type-of($value)}was given.Function
dpcmexpects a number for argument$basebut#{type-of($base)}was given.Function
dpcmexpects somepxvalue for argument$basebut#{$base}was given.
Requires
-
[function]
is-number -
[function]
convert-unit -
[function]
is-string -
[function]
str-is-number -
[function]
cast-number -
[variable]
brandy-font-size
Author
Jakob Eriksen
dppx
@function dppx($value, $base: $brandy-font-size) { ... }
Description
Converts some numeric value to its dppx equivalent
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$value
|
Some value to convert |
Number
|
— none |
$base
|
The base size in |
Number
|
|
Returns
Number
Throws
Function
dppxexpects a number for argument$valuebut#{type-of($value)}was given.Function
dppxexpects a number for argument$basebut#{type-of($base)}was given.Function
dppxexpects somepxvalue for argument$basebut#{$base}was given.
Requires
-
[function]
is-number -
[function]
convert-unit -
[function]
is-string -
[function]
str-is-number -
[function]
cast-number -
[variable]
brandy-font-size
Author
Jakob Eriksen
ms
@function ms($value, $base: $brandy-font-size) { ... }
Description
Converts some numeric value to its ms equivalent
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$value
|
Some value to convert |
Number
|
— none |
$base
|
The base size in |
Number
|
|
Returns
Number
Throws
Function
msexpects a number for argument$valuebut#{type-of($value)}was given.Function
msexpects a number for argument$basebut#{type-of($base)}was given.Function
msexpects somepxvalue for argument$basebut#{$base}was given.
Requires
-
[function]
is-number -
[function]
convert-unit -
[function]
is-string -
[function]
str-is-number -
[function]
cast-number -
[variable]
brandy-font-size
Author
Jakob Eriksen
s
@function s($value, $base: $brandy-font-size) { ... }
Description
Converts some numeric value to its s equivalent
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$value
|
Some value to convert |
Number
|
— none |
$base
|
The base size in |
Number
|
|
Returns
Number
Throws
Function
sexpects a number for argument$valuebut#{type-of($value)}was given.Function
sexpects a number for argument$basebut#{type-of($base)}was given.Function
sexpects somepxvalue for argument$basebut#{$base}was given.
Requires
-
[function]
is-number -
[function]
convert-unit -
[function]
is-string -
[function]
str-is-number -
[function]
cast-number -
[variable]
brandy-font-size
Author
Jakob Eriksen
hz
@function hz($value, $base: $brandy-font-size) { ... }
Description
Converts some numeric value to its hz equivalent
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$value
|
Some value to convert |
Number
|
— none |
$base
|
The base size in |
Number
|
|
Returns
Number
Throws
Function
hzexpects a number for argument$valuebut#{type-of($value)}was given.Function
hzexpects a number for argument$basebut#{type-of($base)}was given.Function
hzexpects somepxvalue for argument$basebut#{$base}was given.
Requires
-
[function]
is-number -
[function]
convert-unit -
[function]
is-string -
[function]
str-is-number -
[function]
cast-number -
[variable]
brandy-font-size
Author
Jakob Eriksen
khz
@function khz($value, $base: $brandy-font-size) { ... }
Description
Converts some numeric value to its khz equivalent
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$value
|
Some value to convert |
Number
|
— none |
$base
|
The base size in |
Number
|
|
Returns
Number
Throws
Function
khzexpects a number for argument$valuebut#{type-of($value)}was given.Function
khzexpects a number for argument$basebut#{type-of($base)}was given.Function
khzexpects somepxvalue for argument$basebut#{$base}was given.
Requires
-
[function]
is-number -
[function]
convert-unit -
[function]
is-string -
[function]
str-is-number -
[function]
cast-number -
[variable]
brandy-font-size
Author
Jakob Eriksen
rem
@function rem($value, $base: $brandy-font-size) { ... }
Description
Converts some numeric value to its rem equivalent
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$value
|
Some value to convert |
Number
|
— none |
$base
|
The base size in |
Number
|
|
Returns
Number
Throws
Function
remexpects a number for argument$valuebut#{type-of($value)}was given.Function
remexpects a number for argument$basebut#{type-of($base)}was given.Function
remexpects somepxvalue for argument$basebut#{$base}was given.
Requires
-
[function]
is-number -
[function]
convert-unit -
[function]
is-string -
[function]
str-is-number -
[function]
cast-number -
[variable]
brandy-font-size
Author
Jakob Eriksen
em
@function em($value, $base: $brandy-font-size) { ... }
Description
Converts some numeric value to its em equivalent
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$value
|
Some value to convert |
Number
|
— none |
$base
|
The base size in |
Number
|
|
Returns
Number
Throws
Function
emexpects a number for argument$valuebut#{type-of($value)}was given.Function
emexpects a number for argument$basebut#{type-of($base)}was given.Function
emexpects somepxvalue for argument$basebut#{$base}was given.
Requires
-
[function]
strip-unit -
[function]
is-number -
[function]
convert-unit -
[function]
is-string -
[function]
str-is-number -
[function]
cast-number -
[variable]
brandy-font-size
Author
Jakob Eriksen
ex
@function ex($value, $base: $brandy-font-size) { ... }
Description
Converts some numeric value to its ex equivalent
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$value
|
Some value to convert |
Number
|
— none |
$base
|
The base size in |
Number
|
|
Returns
Number
Throws
Function
exexpects a number for argument$valuebut#{type-of($value)}was given.Function
exexpects a number for argument$basebut#{type-of($base)}was given.Function
exexpects somepxvalue for argument$basebut#{$base}was given.
Requires
-
[function]
is-number -
[function]
convert-unit -
[function]
is-string -
[function]
str-is-number -
[function]
cast-number -
[variable]
brandy-font-size
Author
Jakob Eriksen
ch
@function ch($value, $base: $brandy-font-size) { ... }
Description
Converts some numeric value to its ch equivalent
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$value
|
Some value to convert |
Number
|
— none |
$base
|
The base size in |
Number
|
|
Returns
Number
Throws
Function
chexpects a number for argument$valuebut#{type-of($value)}was given.Function
chexpects a number for argument$basebut#{type-of($base)}was given.Function
chexpects somepxvalue for argument$basebut#{$base}was given.
Requires
-
[function]
is-number -
[function]
convert-unit -
[function]
is-string -
[function]
str-is-number -
[function]
cast-number -
[variable]
brandy-font-size
Author
Jakob Eriksen
vw
@function vw($value, $base: $brandy-font-size) { ... }
Description
Converts some numeric value to its vw equivalent
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$value
|
Some value to convert |
Number
|
— none |
$base
|
The base size in |
Number
|
|
Returns
Number
Throws
Function
vwexpects a number for argument$valuebut#{type-of($value)}was given.Function
vwexpects a number for argument$basebut#{type-of($base)}was given.Function
vwexpects somepxvalue for argument$basebut#{$base}was given.
Requires
-
[function]
is-number -
[function]
convert-unit -
[function]
is-string -
[function]
str-is-number -
[function]
cast-number -
[variable]
brandy-font-size
Author
Jakob Eriksen
vh
@function vh($value, $base: $brandy-font-size) { ... }
Description
Converts some numeric value to its vh equivalent
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$value
|
Some value to convert |
Number
|
— none |
$base
|
The base size in |
Number
|
|
Returns
Number
Throws
Function
vhexpects a number for argument$valuebut#{type-of($value)}was given.Function
vhexpects a number for argument$basebut#{type-of($base)}was given.Function
vhexpects somepxvalue for argument$basebut#{$base}was given.
Requires
-
[function]
is-number -
[function]
convert-unit -
[function]
is-string -
[function]
str-is-number -
[function]
cast-number -
[variable]
brandy-font-size
Author
Jakob Eriksen
vmin
@function vmin($value, $base: $brandy-font-size) { ... }
Description
Converts some numeric value to its vmin equivalent
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$value
|
Some value to convert |
Number
|
— none |
$base
|
The base size in |
Number
|
|
Returns
Number
Throws
Function
vminexpects a number for argument$valuebut#{type-of($value)}was given.Function
vminexpects a number for argument$basebut#{type-of($base)}was given.Function
vminexpects somepxvalue for argument$basebut#{$base}was given.
Requires
-
[function]
is-number -
[function]
convert-unit -
[function]
is-string -
[function]
str-is-number -
[function]
cast-number -
[variable]
brandy-font-size
Author
Jakob Eriksen
vmax
@function vmax($value, $base: $brandy-font-size) { ... }
Description
Converts some numeric value to its vmax equivalent
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$value
|
Some value to convert |
Number
|
— none |
$base
|
The base size in |
Number
|
|
Returns
Number
Throws
Function
vmaxexpects a number for argument$valuebut#{type-of($value)}was given.Function
vmaxexpects a number for argument$basebut#{type-of($base)}was given.Function
vmaxexpects somepxvalue for argument$basebut#{$base}was given.
Requires
-
[function]
is-number -
[function]
convert-unit -
[function]
is-string -
[function]
str-is-number -
[function]
cast-number -
[variable]
brandy-font-size
Author
Jakob Eriksen
decimal-round
@function decimal-round($number, $digits: 0, $mode: round) { ... }
Description
Rounds a number to the a specific number of digits
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$number
|
Some number to round |
Number
|
— none |
$digits
|
The desired number of decimal places |
Number
|
|
$mode
|
The preferred mode for rounding numbers, either |
Number
|
|
Returns
Number
Throws
Cannot execute
decimal-roundon non-number#{$number}.Function
decimal-roundexpects a positive integer for argument$digitsbut#{$digits}was given.Function
decimal-roundexpectsround,ceil, orfloorfor argument$modebut#{$mode}was given.
Requires
-
[function]
is-number -
[function]
is-float -
[function]
contains -
[function]
convert-unit -
[function]
is-string -
[function]
str-is-number -
[function]
cast-number
Used by
-
[function]
decimal-ceil -
[function]
decimal-floor -
[function]
ratio
Author
Takeru Suzuki
decimal-ceil
@function decimal-ceil($number, $digits: 0) { ... }
Description
Rounds a number up to the a specific number of digits
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$number
|
Some number to ceil |
Number
|
— none |
$digits
|
The desired number of decimal places |
Number
|
|
Returns
Number
Throws
Cannot execute
decimal-ceilon non-number#{$number}.Function
decimal-ceilexpects a positive integer for argument$digitsbut#{$digits}was given.
Requires
-
[function]
decimal-round -
[function]
is-number -
[function]
is-float -
[function]
contains -
[function]
convert-unit -
[function]
is-string -
[function]
str-is-number -
[function]
cast-number
Author
Takeru Suzuki
decimal-floor
@function decimal-floor($number, $digits: 0) { ... }
Description
Rounds a number down to the a specific number of digits
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$number
|
Some number to ceil |
Number
|
— none |
$digits
|
The desired number of decimal places |
Number
|
|
Returns
Number
Throws
Cannot execute
decimal-flooron non-number#{$number}.Function
decimal-floorexpects a positive integer for argument$digitsbut#{$digits}was given.
Requires
-
[function]
decimal-round -
[function]
is-number -
[function]
is-float -
[function]
contains -
[function]
convert-unit -
[function]
is-string -
[function]
str-is-number -
[function]
cast-number
Author
Takeru Suzuki
ratio
(aliased as
fraction
)
@function ratio($x, $y: null, $p: 5) { ... }
Description
Converts a number to its ratio (fraction) equivalent
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$x
|
Some number |
Number
|
— none |
$y
|
Some other number or |
Number</code> or <code>Null
|
|
$p
|
The number of decimal places to consider for floats |
Number
|
|
Returns
String or Null
Throws
Function
ratioexpects a number for argument$xbut#{type-of($x)}was given.Function
ratioexpects a number ornullfor argument$ybut#{type-of($y)}was given.Function
ratioexpects a positive integer for argument$pbut#{$p}was given.
Requires
-
[function]
is-null -
[function]
is-string -
[function]
is-number -
[function]
is-float -
[function]
decimal-round -
[function]
str-is-number -
[function]
cast-number
Used by
-
[function]
fraction
Author
Jakob Eriksen
fraction
(alias for ratio)
@function fraction($x, $y: null, $p) { ... }
Refer to ratio.
numeric-scale
@function numeric-scale($min: 1, $max: 1, $increasing: false) { ... }
Description
Creates an evenly spaced numeric scale ranging from $min to $max based on the number of desired $stops.
Can be either increasing or decreasing based on the value of $increasing. Typically used to
help scale fonts sizes, for instance, from h1 to h6.
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$min
|
Some numeric minimum, where |
Number
|
|
$max
|
Some numeric maximum, where |
Number
|
|
$increasing
|
Whether the scale should be increasing or decreasing |
Boolean
|
|
Returns
Number
— $stops [2] - The desired number of stops within the numeric scale, including the two end points $min and $max
Throws
Function
numeric-scaleexpects a number for argument$minbut#{type-of($min)}was given.Function
numeric-scaleexpects a number for argument$maxbut#{type-of($max)}was given.Function
numeric-scaleexpects$minand$maxto have the same units but#{unit($min)}and#{unit($max)}were given.Function
numeric-scaleexpects a number for argument$stopsbut#{type-of($stops)}was given.Function
numeric-scaleexpects a minimum value of 2 for argument$stopsbut#{$stops}was given.Function
numeric-scaleexpectstrueorfalsefor argument$increasingbut#{$increasing}was given.
Requires
-
[function]
contains -
[function]
is-number -
[function]
strip-unit
Used by
-
[mixin]
scale-font
clamp
@function clamp($number, $min, $max) { ... }
Description
Clamps a numeric value between a $min and $max
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$number
|
The number to clamp between |
Number
|
— none |
$min
|
Some minimum value |
Number
|
— none |
$max
|
Some maximum value |
Number
|
— none |
Returns
Numbers
Throws
Function
clampexpects a number for argument$numberbut#{type-of($number)}was given.Function
clampexpects a number for argument$minbut#{type-of($min)}was given.Function
clampexpects a number for argument$maxbut#{type-of($max)}was given.
Requires
-
[function]
is-number
Scope
mixins
private
@mixin private() { ... }
Description
Helps to create a private variable scope
Parameters
None.
Screens
functions
build-media
@function build-media($media, $max: true) { ... }
Description
Converts a list of media query parameters to a map. If only a number is given as $media, then max-width
or min-width is assumed dependent upon whether $max is true or false, respectively.
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$media
|
A one or more media query parameters |
List</code> or <code>Number
|
— none |
$max
|
Whether numeric values given for |
Boolean
|
|
Returns
Map
— Where null is used in place of any missing values
Throws
Function
build-mediaexpects a list or number for argument$mediabut#{type-of($media)}was given.Function
build-mediaexpectstrueorfalsefor argument$maxbut#{$max}was given.
Requires
-
[function]
is-list -
[function]
contains -
[function]
is-number -
[function]
is-resolution -
[function]
is-null -
[function]
is-length -
[function]
map-set -
[function]
map-deep-get
Used by
-
[mixin]
grid
Selectors
functions
selector
@function selector($selectors, $modifiers) { ... }
Description
To build a list of selectors with optional modifier(s)
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$selectors
|
One or more selectors |
String</code> or <code>List</code> or <code>Arglist
|
— none |
$modifiers
|
One or more modifiers to be added to the selector(s) |
String</code> or <code>List</code> or <code>Arglist
|
— none |
Returns
List
Throws
Function
selectorexpects a string or list for argument$selectorsbut#{type-of($selectors)}was given.Function
selectorexpects a string or list for argument$modifiersbut#{type-of($modifiers)}was given.
Requires
-
[function]
is-list -
[function]
is-arglist -
[function]
is-string
Used by
-
[mixin]
add-buttons -
[mixin]
remove-buttons -
[mixin]
add-text-inputs -
[mixin]
remove-text-inputs -
[mixin]
add-list-inputs -
[mixin]
remove-list-inputs -
[mixin]
add-file-inputs -
[mixin]
remove-file-inputs -
[mixin]
add-toggle-inputs -
[mixin]
remove-toggle-inputs -
[mixin]
add-headings -
[mixin]
remove-toggle-inputs
mixins
placeholder
@mixin placeholder($vendors) { ... }
Description
Helps to style placeholder text of input boxes on various browsers
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$vendors
|
A list of vendor prefixes to use |
List
|
— none |
Requires
-
[function]
contains
spinner
@mixin spinner($vendors) { ... }
Description
Helps to style spinners inside number input boxes on various browsers
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$vendors
|
A list of vendor prefixes to use |
List
|
— none |
Requires
-
[function]
contains
first
@mixin first($count: 1) { ... }
Description
Helps to select one or more child elements at the start of a parent's list of children
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$count
|
The number of the elements to select |
Number
|
|
Used by
-
[mixin]
first-last
Author
Lucas Bonomi
last
@mixin last($count: 1) { ... }
Description
Helps to select one or more child elements at the end of a parent's list of children
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$count
|
The number of the elements to select |
Number
|
|
Used by
-
[mixin]
first-last
Author
Lucas Bonomi
first-last
@mixin first-last($count: 1) { ... }
Description
Helps to select one or more child elements at the start and end of a parent's list of children
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$count
|
The number of elements to select |
Number
|
|
Requires
Author
Lucas Bonomi
after-first
@mixin after-first($count: 1) { ... }
Description
Helps to select all child elements after the first child descendant of the parent
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$count
|
The index of the child to start on from the start of the child list minus the first child |
Number
|
|
Author
Lucas Bonomi
before-last
@mixin before-last($count: 1) { ... }
Description
Helps to select all child elements before the last child descendant of the parent
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$count
|
The index of the child to start on from the end of the child list minus the last child |
Number
|
|
Author
Lucas Bonomi
from-start
@mixin from-start($count: 1) { ... }
Description
Helps to select a child element from the start of parent's list of children
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$count
|
The index of the child to select from the start of the parent's child list |
Number
|
|
Used by
-
[mixin]
from-start-end
Author
Lucas Bonomi
from-end
@mixin from-end($count: 1) { ... }
Description
Helps to select a child element from the end of parent's list of children
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$count
|
The index of the child to select from the end of the parent's child list |
Number
|
|
Used by
-
[mixin]
from-start-end
Author
Lucas Bonomi
from-start-end
@mixin from-start-end($count: 1) { ... }
Description
Helps to select a child element from the start and end of parent's list of children
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$count
|
The index of the child to select from the top of the parent's child list |
Number
|
|
Requires
-
[mixin]
from-start -
[mixin]
from-end
Author
Lucas Bonomi
even
@mixin even() { ... }
Description
Helps to select all even numbered child elements from a parent's list of children
Parameters
None.
Author
Lucas Bonomi
odd
@mixin odd() { ... }
Description
Helps to select all odd numbered child elements from a parent's list of children
Parameters
None.
Author
Lucas Bonomi
between
@mixin between($first: 1, $last: 1) { ... }
Description
Helps to select all child elements between $first and $last from a parent's list of children
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$first
|
The index of the first child element in the parent's child list |
Number
|
|
$last
|
The index of the last child element in the parent's child list |
Number
|
|
Author
Lucas Bonomi
even-between
@mixin even-between($first: 1, $last: 1) { ... }
Description
Helps to select all even numbered child elements between $first and $last from a parent's list of children
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$first
|
The index of the first child element in the parent's child list |
Number
|
|
$last
|
The index of the last child element in the parent's child list |
Number
|
|
Author
Lucas Bonomi
each-between
(aliased as
every-between
)
@mixin each-between($n, $first: 1, $last: 1) { ... }
Description
Helps to select each child element matching the pattern $n between $first and $last from a parent's list of children
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$n
|
Some pattern of children to select |
Number
|
— none |
$first
|
The index of the first child element in the parent's child list |
Number
|
|
$last
|
The index of the last child element in the parent's child list |
Number
|
|
Used by
-
[mixin]
every-between
Author
Lucas Bonomi
every-between
(alias for each-between)
@mixin every-between($n, $first: 1, $last: 1) { ... }
Refer to each-between.
child
@mixin child($index: 1) { ... }
Description
Helps to select a child element by index from a parent's list of children
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$index
|
The index of the child to select from the parent's child list |
Number
|
|
Author
Lucas Bonomi
all-but
@mixin all-but($index: 1) { ... }
Description
Helps to select a child from a parent's list of children excluding the child at the given index
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$index
|
The index of the child to ignore from the parent's child list |
Number
|
|
Author
Lucas Bonomi
all-but-first-last
@mixin all-but-first-last($index: 1) { ... }
Description
Helps to select a child from a parent's list of children excluding the first and last children
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$index
|
The index of the child to select |
Number
|
|
Author
Lucas Bonomi
each
(aliased as
every
)
@mixin each($n: 1) { ... }
Description
Helps to select each child element matching the pattern $n from a parent's list of children
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$n
|
Some pattern of children to select |
Number
|
|
Used by
-
[mixin]
every
Author
Lucas Bonomi
every
(alias for each)
@mixin every($n: 1) { ... }
Refer to each.
middle
@mixin middle($count) { ... }
Description
Helps to select the middle child element (odd) or middle children elements (even) from a parent's list of children, given a child count
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$count
|
The number of children the parent element should have |
Number
|
— none |
Author
Lucas Bonomi
last-of
@mixin last-of($limit: 1) { ... }
Description
Helps to select a the last type-specific child from a parent's list of children
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$limit
|
Some type limitation |
Number
|
|
Author
Lucas Bonomi
at-least
@mixin at-least($x: 1) { ... }
Description
Helps to select child elements with at least $x number of items from a parent's list of children
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$x
|
Some number of items |
Number
|
|
Requires
-
[function]
last
Author
Lucas Bonomi
at-most
@mixin at-most($x: 1) { ... }
Description
Helps to select child elements with at most $x number of items from a parent's list of children
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$x
|
Some number of items |
Number
|
|
Requires
-
[function]
last
Author
Lucas Bonomi
in-between
@mixin in-between($min: 1, $max: 1) { ... }
Description
Helps to select child elements with number of items between $min and $max from a parent's list of children
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$min
|
Minimum number of items |
Number
|
|
$max
|
Maximum number of items |
Number
|
|
Requires
-
[function]
last
Author
Lucas Bonomi
first-child
@mixin first-child() { ... }
Description
Helps to select the first exact child element from a parent's list of children
Parameters
None.
Used by
-
[mixin]
first-last-child
Author
Lucas Bonomi
last-child
@mixin last-child() { ... }
Description
Helps to select the last exact child element from a parent's list of children
Parameters
None.
Used by
-
[mixin]
first-last-child
Author
Lucas Bonomi
first-last-child
@mixin first-last-child() { ... }
Description
Helps to select the first and last exact child elements from a parent's list of children
Parameters
None.
Requires
-
[mixin]
first-child -
[mixin]
last-child
Author
Lucas Bonomi
unique
@mixin unique() { ... }
Description
Helps to select only child elements that are unique to a parent's list of children
Parameters
None.
Author
Lucas Bonomi
only
(alias for unique)
@mixin only() { ... }
Refer to unique.
not-unique
(aliased as
not-only
)
@mixin not-unique() { ... }
Description
Helps to select only child elements that are not unique to a parent's list of children
Parameters
None.
Author
Lucas Bonomi
not-only
(alias for not-unique)
@mixin not-only() { ... }
Refer to not-unique.
when-child-of
@mixin when-child-of($context) { ... }
Description
Targets an element when it's an immediate child of another element
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$context
|
Some parent element context |
String</code> or <code>List
|
— none |
Author
Hugo Giraudel
when-adjacent-sibling-of
@mixin when-adjacent-sibling-of($context) { ... }
Description
Targets an element when it's an adjacent sibling of another element
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$context
|
Some adjacent sibling element context |
String</code> or <code>List
|
— none |
Author
Hugo Giraudel
when-sibling-of
@mixin when-sibling-of($context) { ... }
Description
Targets an element when it's a general sibling of another element
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$context
|
Some sibling element context |
String</code> or <code>List
|
— none |
Author
Hugo Giraudel
when-descendant-of
@mixin when-descendant-of($context) { ... }
Description
Targets an element when it's a descendant of another element
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$context
|
Some ascendant element context |
String</code> or <code>List
|
— none |
Author
Hugo Giraudel
Setters
mixins
config
@mixin config($key, $value, $overwrite: false) { ... }
Description
Sets a value in the $brandy-config-map
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$key
|
A key in the configuration set given in dot notation |
String
|
— none |
$value
|
Some value |
Mixed
|
— none |
$overwrite
|
Allows or disallows overwriting of existing properties |
Boolean
|
|
Throws
Configuration
#{$key}already exists and overwriting was not permitted.
Requires
-
[function]
str-split -
[function]
map-deep-set -
[function]
map-has-keys -
[variable]
brandy-config-map
const
@mixin const($key, $value) { ... }
Description
Sets a value in the $brandy-const-map
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$key
|
A key in the constants map given in dot notation |
String
|
— none |
$value
|
Some value |
Mixed
|
— none |
Throws
Constant
#{$key}already exists.
Requires
-
[function]
str-split -
[function]
map-deep-set -
[function]
map-has-keys -
[variable]
brandy-const-map
color
@mixin color($key, $value, $overwrite: false) { ... }
Description
Sets a value in the $brandy-colors-map
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$key
|
A key in the colors map given in dot notation |
String
|
— none |
$value
|
Some value |
Mixed
|
— none |
$overwrite
|
Allows or disallows overwriting of existing properties |
Boolean
|
|
Throws
Color
#{$key}already exists and overwriting was not permitted.
Requires
-
[function]
str-split -
[function]
map-deep-set -
[function]
map-has-keys -
[variable]
brandy-colors-map
font
@mixin font($key, $value, $overwrite: false) { ... }
Description
Sets a value in the $brandy-fonts-map
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$key
|
A key in the fonts map given in dot notation |
String
|
— none |
$value
|
Some value |
Mixed
|
— none |
$overwrite
|
Allows or disallows overwriting of existing properties |
Boolean
|
|
Throws
Font
#{$key}already exists and overwriting was not permitted.
Requires
-
[variable]
brandy-fonts-map -
[variable]
brandy-fonts-map -
[variable]
brandy-fonts-map -
[function]
str-split -
[function]
map-deep-set -
[function]
map-has-keys -
[variable]
brandy-colors-map
screen
@mixin screen($key, $value, $overwrite: false) { ... }
Description
Sets a value in the $brandy-screens-map
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$key
|
A key in the screens map given in dot notation |
String
|
— none |
$value
|
Some value |
Mixed
|
— none |
$overwrite
|
Allows or disallows overwriting of existing properties |
Boolean
|
|
Throws
Screen
#{$key}already exists and overwriting was not permitted.
Requires
-
[function]
str-split -
[function]
map-deep-set -
[function]
map-has-keys -
[variable]
brandy-screens-map
z
@mixin z($key, $value, $overwrite: false) { ... }
Description
Sets a value in the $brandy-z-map
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$key
|
A key in the z map given in dot notation |
String
|
— none |
$value
|
Some value |
Mixed
|
— none |
$overwrite
|
Allows or disallows overwriting of existing properties |
Boolean
|
|
Throws
Z-layer
#{$key}already exists and overwriting was not permitted.
Requires
-
[variable]
brandy-z-map -
[variable]
brandy-z-map -
[variable]
brandy-z-map -
[function]
str-split -
[function]
map-deep-set -
[function]
map-has-keys -
[variable]
brandy-screens-map
Shapes
mixins
triangle
@mixin triangle($direction, $width, $height, $color: $brandy-dark-text) { ... }
Description
Generates a triangle shape pointing in the designated direction
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$direction
|
The desired direction, either |
String
|
— none |
$width
|
The desired width of the triangle |
Number
|
— none |
$height
|
The desired height of the triangle |
Number
|
— none |
$color
|
The desired color of the triangle |
Color
|
|
Throws
Mixin
trianglecannot use invalid direction#{$direction}.Mixin
triangleexpects a number for argument$widthbut#{type-of($width)}was given.Mixin
triangleexpects a number for argument$heightbut#{type-of($height)}was given.Mixin
triangleexpects a color for argument$colorbut#{type-of($color)}was given.
Requires
-
[function]
contains -
[mixin]
size -
[mixin]
border-x -
[mixin]
border-y -
[function]
is-number -
[function]
is-color
Author
Thoughtbot, Inc.
chevron
@mixin chevron($direction, $size, $thickness, $color: $brandy-dark-text, $radius: 0) { ... }
Description
Generates a chevron shape pointing in the designated direction
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$direction
|
The desired direction, either |
String
|
— none |
$size
|
The desired width and height of the chevron |
Number
|
— none |
$thickness
|
The desired thickness of the chevron |
Number
|
— none |
$color
|
The desired color of the chevron |
Color
|
|
$radius
|
The desired border radius of the chevron |
Number
|
|
Throws
Mixin
chevroncannot use invalid direction#{$direction}.Mixin
chevronexpects a number for argument$sizebut#{type-of($size)}was given.Mixin
chevronexpects a color for argument$colorbut#{type-of($color)}was given.Mixin
chevronexpects a number for argument$radiusbut#{type-of($radius)}was given.
Requires
circle
@mixin circle($width: 100%, $height: $width, $color: $brandy-dark-text) { ... }
Description
Generates a circular shape, either a circle or oval dependent upon the $width and $height given
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$width
|
The desired width of the circle |
Number
|
|
$height
|
The desired height of the circle |
Number
|
|
$color
|
The desired color of the circle |
Color
|
|
Throws
Mixin
circleexpects a number for argument$widthbut#{type-of($width)}was given.Mixin
circleexpects a number for argument$heightbut#{type-of($height)}was given.Mixin
circleexpects a color for argument$colorbut#{type-of($color)}was given.
Requires
square
@mixin square($width: 100%, $height: $width, $color: $brandy-dark-text) { ... }
Description
Generates a square shape, either a square or rectangle dependent upon the $width and $height given
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$width
|
The desired width of the square |
Number
|
|
$height
|
The desired height of the square |
Number
|
|
$color
|
The desired color of the square |
Color
|
|
Throws
Mixin
squareexpects a number for argument$widthbut#{type-of($width)}was given.Mixin
squareexpects a number for argument$heightbut#{type-of($height)}was given.Mixin
squareexpects a color for argument$colorbut#{type-of($color)}was given.
Requires
Sprites
functions
sprite
@function sprite($image, $rows, $ids, $size, $spacing: 0) { ... }
Description
Builds a sprite object for easy manipulation
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$image
|
Some path for an image sprite |
String
|
— none |
$rows
|
The number of rows in the image sprite |
Number
|
— none |
$ids
|
A list of unique identifiers for each image within the sprite |
List
|
— none |
$size
|
A list of numbers containing the |
List
|
— none |
$spacing
|
The amount of spacing between each image in the sprite |
Number
|
|
Returns
Sprite
Throws
Function
spriteexpects a string for argument$imagebut#{type-of($image)}was given.Function
spriteexpects a number for argument$rowsbut#{type-of($rows)}was given.Function
spriteexpects a list for argument$idsbut#{type-of($ids)}was given.Function
spriteexpects all items in list$idsto be unique.Function
spriteexpects a list for argument$sizebut#{type-of($size)}was given.Function
spriteexpects argument$sizeto have a length of2but length was#{length($size)}.Function
spriteexpects a number for first item, width, in list$sizebut#{type-of($width)}was given.Function
spriteexpects a number for second item, height, in list$sizebut#{type-of($height)}was given.Function
spriteexpects a number for argument$spacingbut#{type-of($spacing)}was given.
Requires
sprite-url
@function sprite-url($sprite) { ... }
Description
Gets the image path of an image sprite with a sprite object
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$sprite
|
Some sprite object |
Sprite
|
— none |
Returns
String
Throws
Cannot execute
sprite-urlon non-sprite#{$sprite}.
Requires
-
[function]
is-sprite
Used by
-
[mixin]
sprite-image
sprite-set-url
@function sprite-set-url($sprite, $url) { ... }
Description
Sets the image path associated with a sprite
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$sprite
|
Some sprite object |
Sprite
|
— none |
$url
|
A path to an image sprite |
String
|
— none |
Returns
Sprite
Throws
Cannot execute
sprite-set-urlon non-sprite#{$sprite}.Function
sprite-set-urlexpects a string for argument$urlbut#{type-of($url)}was given.
Requires
sprite-spacing
@function sprite-spacing($sprite) { ... }
Description
Gets the spacing between images within a sprite
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$sprite
|
Some sprite object |
Sprite
|
— none |
Returns
Number
Throws
Cannot execute
sprite-spacingon non-sprite#{$sprite}.
Requires
-
[function]
is-sprite
Used by
-
[function]
sprite-position
sprite-set-spacing
@function sprite-set-spacing($sprite, $spacing) { ... }
Description
Sets the spacing between images within a sprite
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$sprite
|
Some sprite object |
Sprite
|
— none |
$spacing
|
The amount of spacing between images within the sprite |
Number
|
— none |
Returns
Sprite
Throws
Cannot execute
sprite-set-spacingon non-sprite#{$sprite}.Function
sprite-set-spacingexpects a number for argument$spacingbut#{type-of($spacing)}was given.
Requires
sprite-width
@function sprite-width($sprite) { ... }
Description
Gets the width of the images within a sprite
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$sprite
|
Some sprite object |
Sprite
|
— none |
Returns
Number
Throws
Cannot execute
sprite-widthon non-sprite#{$sprite}.
Requires
-
[function]
is-sprite
Used by
-
[function]
sprite-size -
[function]
sprite-position -
[mixin]
sprite-image
sprite-set-width
@function sprite-set-width($sprite, $width) { ... }
Description
Sets the width of the images within a sprite
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$sprite
|
Some sprite object |
Sprite
|
— none |
$width
|
The width of each image in the sprite |
Number
|
— none |
Returns
Sprite
Throws
Cannot execute
sprite-set-widthon non-sprite#{$sprite}.Function
sprite-set-widthexpects a number for argument$widthbut#{type-of($width)}was given.
Requires
sprite-height
@function sprite-height($sprite) { ... }
Description
Gets the height of the images within a sprite
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$sprite
|
Some sprite object |
Sprite
|
— none |
Returns
Number
Throws
Cannot execute
sprite-heighton non-sprite#{$sprite}.
Requires
-
[function]
is-sprite
Used by
-
[function]
sprite-size -
[function]
sprite-position -
[mixin]
sprite-image
sprite-set-height
@function sprite-set-height($sprite, $height) { ... }
Description
Sets the height of the images within a sprite
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$sprite
|
Some sprite object |
Sprite
|
— none |
$height
|
The height of each image in the sprite |
Number
|
— none |
Returns
Sprite
Throws
Cannot execute
sprite-set-heighton non-sprite#{$sprite}.Function
sprite-set-heightexpects a number for argument$heightbut#{type-of($height)}was given.
Requires
sprite-size
@function sprite-size($sprite) { ... }
Description
Gets the width and height of the images within a sprite
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$sprite
|
Some sprite object |
Sprite
|
— none |
Returns
List
— In the format (width height)
Throws
Cannot execute
sprite-sizeon non-sprite#{$sprite}.
Requires
-
[function]
is-sprite -
[function]
sprite-width -
[function]
sprite-height
sprite-set-size
@function sprite-set-size($sprite, $size) { ... }
Description
Sets the width and height of the images within a sprite
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$sprite
|
Some sprite object |
Sprite
|
— none |
$size
|
The list of numbers correlating to the |
List
|
— none |
Returns
Sprite
Throws
Cannot execute
sprite-set-sizeon non-sprite#{$sprite}.Function
sprite-set-sizeexpects a list for argument$sizebut#{type-of($size)}was given.Function
sprite-set-sizeexpects argument$sizeto have a length of2but length was#{length($size)}.Function
sprite-set-sizeexpects a number for first item, width, in list$sizebut#{type-of($width)}was given.Function
sprite-set-sizeexpects a number for second item, height, in list$sizebut#{type-of($height)}was given.
Requires
sprite-position
@function sprite-position($sprite, $id) { ... }
Description
Locates an item by ID within a sprite
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$sprite
|
Some sprite object |
Sprite
|
— none |
$id
|
The identifier of the target item within the sprite object |
String
|
— none |
Returns
List
— In the format (x y)
Throws
Cannot execute
sprite-positionon non-sprite#{$sprite}.Cannot execute
sprite-positionsince sprite does not contain the value#{$id}.
Requires
-
[function]
is-sprite -
[function]
matrix-has-value -
[function]
sprite-width -
[function]
sprite-height -
[function]
sprite-spacing -
[function]
matrix-coords -
[function]
first -
[function]
last
Used by
-
[mixin]
sprite-image
mixins
sprite-image
@mixin sprite-image($sprite, $id, $repeat: false) { ... }
Description
Extracts an image from a sprite
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$sprite
|
Some sprite object to extract an image from |
Sprite
|
— none |
$id
|
The identifier of the image to be extracted from the sprite object |
String
|
— none |
$repeat
|
Whether the sprite image should be repeating |
Boolean
|
|
Throws
Mixin
sprite-imageexpects a sprite for argument$spritebut#{type-of($sprite)}was given.Mixin
sprite-imageexpects a string for argument$idbut#{type-of($id)}was given.Mixin
sprite-imageexpects atrueorfalsefor argument$repeatbut#{$repeat}was given.
Requires
-
[function]
is-sprite -
[function]
is-string -
[function]
contains -
[function]
sprite-url -
[function]
sprite-position -
[function]
sprite-width -
[function]
sprite-height
States
mixins
on-event
@mixin on-event($self: false, $events: hover active focus) { ... }
Description
Sets an element's event state
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$self
|
Whether or not the include the current selector |
Boolean
|
|
$events
|
The types of events to include |
List
|
|
Author
Harry Roberts
on-hover
@mixin on-hover($property, $normal, $hover) { ... }
Description
Sets a property's normal and hover state
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$property
|
Some property to set |
String
|
— none |
$normal
|
Some property value for the normal state |
Mixed
|
— none |
$hover
|
Some property value for the hover state |
Mixed
|
— none |
Author
Kyle Brumm
on-focus
@mixin on-focus($property, $normal, $focus) { ... }
Description
Sets a property's normal and focus state
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$property
|
Some property to set |
String
|
— none |
$normal
|
Some property value for the normal state |
Mixed
|
— none |
$focus
|
Some property value for the focus state |
Mixed
|
— none |
on-hover-focus
(aliased as
on-focus-hover
)
@mixin on-hover-focus($property, $normal, $hover-focus) { ... }
Description
Sets a property's normal, hover, and focus state
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$property
|
Some property to set |
String
|
— none |
$normal
|
Some property value for the normal state |
Mixed
|
— none |
$hover-focus
|
Some property value for the hover and focus state |
Mixed
|
— none |
Used by
-
[mixin]
on-focus-hover
on-focus-hover
(alias for on-hover-focus)
@mixin on-focus-hover($property, $normal, $hover-focus) { ... }
Refer to on-hover-focus.
on-hover-focus-active
(aliased as
on-hover-active-focus
on-focus-hover-active
on-focus-active-hover
on-active-hover-focus
on-active-focus-hover
)
@mixin on-hover-focus-active($property, $normal, $hover) { ... }
Description
Sets a property's normal, hover, focus, and active state
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$property
|
Some property to set |
String
|
— none |
$normal
|
Some property value for the normal state |
Mixed
|
— none |
$hover
|
Some property value for the hover state |
Mixed
|
— none |
Used by
-
[mixin]
on-hover-active-focus -
[mixin]
on-focus-hover-active -
[mixin]
on-focus-active-hover -
[mixin]
on-active-hover-focus -
[mixin]
on-active-focus-hover
on-hover-active-focus
(alias for on-hover-focus-active)
@mixin on-hover-active-focus($property, $normal, $hover) { ... }
Refer to on-hover-focus-active.
on-focus-hover-active
(alias for on-hover-focus-active)
@mixin on-focus-hover-active($property, $normal, $hover) { ... }
Refer to on-hover-focus-active.
on-focus-active-hover
(alias for on-hover-focus-active)
@mixin on-focus-active-hover($property, $normal, $hover) { ... }
Refer to on-hover-focus-active.
on-active-hover-focus
(alias for on-hover-focus-active)
@mixin on-active-hover-focus($property, $normal, $hover) { ... }
Refer to on-hover-focus-active.
on-active-focus-hover
(alias for on-hover-focus-active)
@mixin on-active-focus-hover($property, $normal, $hover) { ... }
Refer to on-hover-focus-active.
on-active
@mixin on-active($property, $normal, $active) { ... }
Description
Sets a property's normal and active state
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$property
|
Some property to set |
String
|
— none |
$normal
|
Some property value for the normal state |
Mixed
|
— none |
$active
|
Some property value for the active state |
Mixed
|
— none |
on-link
@mixin on-link($property, $normal, $link) { ... }
Description
Sets a property's normal and link state
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$property
|
Some property to set |
String
|
— none |
$normal
|
Some property value for the normal state |
Mixed
|
— none |
$link
|
Some property value for the link state |
Mixed
|
— none |
on-visited
@mixin on-visited($property, $normal, $visited) { ... }
Description
Sets a property's normal and visited state
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$property
|
Some property to set |
String
|
— none |
$normal
|
Some property value for the normal state |
Mixed
|
— none |
$visited
|
Some property value for the visited state |
Mixed
|
— none |
on-target
@mixin on-target($property, $normal, $target) { ... }
Description
Sets a property's normal and target state
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$property
|
Some property to set |
String
|
— none |
$normal
|
Some property value for the normal state |
Mixed
|
— none |
$target
|
Some property value for the target state |
Mixed
|
— none |
on-disabled
@mixin on-disabled($property, $normal, $disabled) { ... }
Description
Sets a property's normal and disabled state
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$property
|
Some property to set |
String
|
— none |
$normal
|
Some property value for the normal state |
Mixed
|
— none |
$disabled
|
Some property value for the disabled state |
Mixed
|
— none |
on-enabled
@mixin on-enabled($property, $normal, $enabled) { ... }
Description
Sets a property's normal and enabled state
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$property
|
Some property to set |
String
|
— none |
$normal
|
Some property value for the normal state |
Mixed
|
— none |
$enabled
|
Some property value for the enabled state |
Mixed
|
— none |
on-checked
@mixin on-checked($property, $normal, $checked) { ... }
Description
Sets a property's normal and checked state
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$property
|
Some property to set |
String
|
— none |
$normal
|
Some property value for the normal state |
Mixed
|
— none |
$checked
|
Some property value for the checked state |
Mixed
|
— none |
on-not-checked
@mixin on-not-checked($property, $normal, $not-checked) { ... }
Description
Sets a property's normal and not checked state
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$property
|
Some property to set |
String
|
— none |
$normal
|
Some property value for the normal state |
Mixed
|
— none |
$not-checked
|
Some property value for the not-checked state |
Mixed
|
— none |
on-indeterminate
@mixin on-indeterminate($property, $normal, $indeterminate) { ... }
Description
Sets a property's normal and indeterminate state
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$property
|
Some property to set |
String
|
— none |
$normal
|
Some property value for the normal state |
Mixed
|
— none |
$indeterminate
|
Some property value for the indeterminate state |
Mixed
|
— none |
on-required
@mixin on-required($property, $normal, $required) { ... }
Description
Sets a property's normal and required state
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$property
|
Some property to set |
String
|
— none |
$normal
|
Some property value for the normal state |
Mixed
|
— none |
$required
|
Some property value for the required state |
Mixed
|
— none |
on-optional
@mixin on-optional($property, $normal, $optional) { ... }
Description
Sets a property's normal and optional state
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$property
|
Some property to set |
String
|
— none |
$normal
|
Some property value for the normal state |
Mixed
|
— none |
$optional
|
Some property value for the optional state |
Mixed
|
— none |
on-read-only
@mixin on-read-only($property, $normal, $read-only) { ... }
Description
Sets a property's normal and read-only state
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$property
|
Some property to set |
String
|
— none |
$normal
|
Some property value for the normal state |
Mixed
|
— none |
$read-only
|
Some property value for the read-only state |
Mixed
|
— none |
on-read-write
@mixin on-read-write($property, $normal, $read-write) { ... }
Description
Sets a property's normal and read-write state
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$property
|
Some property to set |
String
|
— none |
$normal
|
Some property value for the normal state |
Mixed
|
— none |
$read-write
|
Some property value for the read-write state |
Mixed
|
— none |
on-empty
@mixin on-empty($property, $normal, $enabled) { ... }
Description
Sets a property's normal and empty state
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$property
|
Some property to set |
String
|
— none |
$normal
|
Some property value for the normal state |
Mixed
|
— none |
$enabled
|
Some property value for the empty state |
Mixed
|
— none |
Strings
functions
str-replace
@function str-replace($string, $search, $replace: '') { ... }
Description
Replaces all instances of a search string with a replacement string
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$string
|
The string to be worked on |
String
|
— none |
$search
|
The string to be searched for |
String
|
— none |
$replace
|
The string to be used as a replacement |
String
|
|
Returns
String
Throws
Function
str-replaceexpects a string for argument$stringbut #{type-of($string)} was given.Function
str-replaceexpects a string for argument$searchbut #{type-of($search)} was given.Function
str-replaceexpects a string for argument$replacebut #{type-of($replace)} was given.
Requires
Used by
-
[function]
font-source -
[mixin]
google-font
Author
Hugo Giraudel
str-split
@function str-split($string, $delimiter: ',') { ... }
Description
Splits a string into a list
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$string
|
The string to be worked on |
String
|
— none |
$delimiter
|
The string delimiter |
String
|
|
Returns
List
Throws
Function
str-splitexpects a string for argument$stringbut #{type-of($string)} was given.Function
str-splitexpects a string for argument$delimiterbut #{type-of($delimiter)} was given.
Requires
Used by
-
[function]
cast-map -
[function]
cast-map -
[function]
config -
[function]
const -
[function]
color -
[function]
font -
[function]
screen -
[function]
z -
[function]
map-deep-get -
[function]
map-deep-set -
[function]
map-has-keys -
[mixin]
config -
[mixin]
const -
[mixin]
color -
[mixin]
font -
[mixin]
screen -
[mixin]
z -
[function]
str-word-count -
[function]
str-shuffle -
[function]
to-capitalize -
[function]
to-title-case
str-trim
@function str-trim($string, $characters: ' ') { ... }
Description
Removes extra characters from the start and end of a string
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$string
|
The string to be worked on |
String
|
— none |
$characters
|
One or more characters to be trimmed |
String</code> or <code>List
|
|
Returns
String
Throws
Function
str-trimexpects a string for argument$stringbut #{type-of($string)} was given.Function
str-trimexpects a string or list for argument$charactersbut #{type-of($characters)} was given.
Requires
Used by
-
[function]
cast-string
str-trim-right
@function str-trim-right($string, $characters: ' ') { ... }
Description
Removes extra characters from the end of a string
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$string
|
The string to be worked on |
String
|
— none |
$characters
|
One or more characters to be trimmed |
String</code> or <code>List
|
|
Returns
String
Throws
Function
str-trim-rightexpects a string for argument$stringbut #{type-of($string)} was given.Function
str-trim-rightexpects a string or list for argument$charactersbut #{type-of($characters)} was given.
Requires
str-trim-left
@function str-trim-left($string, $characters: ' ') { ... }
Description
Removes extra characters from the start of a string
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$string
|
The string to be worked on |
String
|
— none |
$characters
|
One or more characters to be trimmed |
String</code> or <code>List
|
|
Returns
String
Throws
Function
str-trim-leftexpects a string for argument$stringbut #{type-of($string)} was given.Function
str-trim-leftexpects a string or list for argument$charactersbut #{type-of($characters)} was given.
Requires
str-contains
@function str-contains($string, $search) { ... }
Description
Determines if a string contains another string
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$string
|
The string to be worked on |
String
|
— none |
$search
|
The string to be searched for |
String
|
— none |
Returns
String
Throws
Function
str-containsexpects a string for argument$stringbut #{type-of($string)} was given.Function
str-containsexpects a string for argument$searchbut #{type-of($search)} was given.
Requires
-
[function]
is-string
str-starts-with
@function str-starts-with($string, $search) { ... }
Description
Determines if a string starts with another string
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$string
|
The string to be worked on |
String
|
— none |
$search
|
The string to be searched for |
String
|
— none |
Returns
String
Throws
Function
str-containsexpects a string for argument$stringbut #{type-of($string)} was given.Function
str-containsexpects a string for argument$searchbut #{type-of($search)} was given.
Requires
-
[function]
is-string
str-ends-with
@function str-ends-with($string, $search) { ... }
Description
Determines if a string ends with another string
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$string
|
The string to be worked on |
String
|
— none |
$search
|
The string to be searched for |
String
|
— none |
Returns
String
Throws
Function
str-containsexpects a string for argument$stringbut #{type-of($string)} was given.Function
str-containsexpects a string for argument$searchbut #{type-of($search)} was given.
Requires
-
[function]
is-string
str-reverse
@function str-reverse($string) { ... }
Description
Reverses a string
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$string
|
Some string |
String
|
— none |
Returns
String
Throws
Cannot execute
str-reverseon non-string#{$string}.
Requires
Used by
-
[function]
str-is-palindrome
str-is-palindrome
@function str-is-palindrome($string) { ... }
Description
Determines if a string is a palindrome
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$string
|
Some string |
String
|
— none |
Returns
Boolean
Throws
Cannot execute
str-is-palindromeon non-string#{$string}.
Requires
-
[function]
str-reverse -
[function]
is-string
str-is-letter
@function str-is-letter($string) { ... }
Description
Determines if a string is a letter
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$string
|
Some string |
String
|
— none |
Returns
Boolean
Throws
Cannot execute
str-is-letteron non-string#{$string}.
Requires
-
[function]
is-string -
[function]
char-at -
[variable]
brandy-letters
Used by
-
[function]
range-alpha -
[function]
range-alpha-min-max -
[function]
str-is-number
str-is-symbol
@function str-is-symbol($string) { ... }
Description
Determines if a string is a symbol
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$string
|
Some string |
String
|
— none |
Returns
Boolean
Throws
Cannot execute
str-is-symbolon non-string#{$string}.
Requires
-
[function]
is-string -
[function]
char-at -
[function]
contains -
[variable]
brandy-symbols
Used by
-
[function]
str-is-number
str-is-unit
@function str-is-unit($string) { ... }
Description
Determines if a string is representative of some units
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$string
|
Some string representation of a unit |
String
|
— none |
Returns
Boolean
Throws
Cannot execute
str-is-uniton non-string#{$string}.
Requires
-
[function]
is-string -
[variable]
brandy-units
Used by
-
[function]
cast-number -
[function]
str-is-number
str-is-number
@function str-is-number($string) { ... }
Description
Determines if a string is a number
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$string
|
Some string |
String
|
— none |
Returns
Boolean
Throws
Cannot execute
str-is-numberon non-string#{$string}.
Requires
-
[function]
is-null -
[function]
is-string -
[function]
str-is-letter -
[function]
str-is-symbol -
[function]
str-is-unit -
[function]
is-negative -
[function]
char-at -
[variable]
brandy-numbers -
[function]
str-tail -
[function]
str-first
Used by
-
[function]
cast-number -
[function]
range -
[function]
range-min-max -
[function]
sum -
[function]
avg -
[function]
unitless-rad -
[function]
convert-unit -
[function]
strip-unit -
[function]
is-negative -
[function]
is-positive -
[function]
is-zero -
[function]
extract-unit -
[function]
is-percentage -
[function]
is-even -
[function]
is-odd -
[function]
is-integer -
[function]
is-float -
[function]
is-angle -
[function]
is-frequency -
[function]
is-relative-length -
[function]
is-absolute-length -
[function]
is-resolution -
[function]
is-time -
[function]
inverse -
[function]
px -
[function]
pt -
[function]
pc -
[function]
in -
[function]
mm -
[function]
cm -
[function]
deg -
[function]
rad -
[function]
grad -
[function]
turn -
[function]
dpi -
[function]
dpcm -
[function]
dppx -
[function]
ms -
[function]
s -
[function]
hz -
[function]
khz -
[function]
rem -
[function]
em -
[function]
ex -
[function]
ch -
[function]
vw -
[function]
vh -
[function]
vmin -
[function]
vmax -
[function]
decimal-round -
[function]
decimal-ceil -
[function]
decimal-floor -
[function]
ratio -
[function]
fraction -
[function]
fraction
str-between
@function str-between($string, $first, $last, $inclusive: true) { ... }
Description
Retrieves the substring between two characters
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$string
|
Some string to be indexed |
String
|
— none |
$first
|
The first character to look for, optionally passed as a list where second item indicates occurrence index |
String</code> or <code>List
|
— none |
$last
|
The last character to look for, optionally passed as a list where second item indicates occurrence index |
String</code> or <code>List
|
— none |
$inclusive
|
Whether or not the |
Boolean
|
|
Returns
String
— The string between $first and $last or '' if no occurrence of $last follows $first
Throws
Function
str-betweenexpects a string for argument$stringbut #{type-of($string)} was given.Function
str-betweenexpects a string or list for argument$firstbut #{type-of($first)} was given.Function
str-betweenexpects a string or list for argument$lastbut #{type-of($last)} was given.Function
str-betweenexpectstrueorfalsefor argument$inclusivebut #{$inclusive} was given.Function
str-betweenonly permits one character for arguments$firstand$last.Function
str-betweenexpects first argument in list$firstto be a string but #{type-of(first($first))} given.Function
str-betweenexpects last argument in list$firstto be a number but #{type-of(last($first))} given.Function
str-betweenexpects first argument in list$lastto be a string but #{type-of(first($last))} given.Function
str-betweenexpects last argument in list$lastto be a number but #{type-of(last($last))} given.
Requires
char-at
@function char-at($string, $index) { ... }
Description
Extracts a character at the given index within a string
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$string
|
Some string |
String
|
— none |
$index
|
The index at which the character should be extracted |
Number
|
— none |
Returns
String
Throws
Function
char-atexpects a string for argument$stringbut #{type-of($string)} was given.Function
char-atexpects a number for argument$indexbut #{type-of($index)} was given.
Requires
Used by
-
[function]
cast-number -
[function]
aeq -
[function]
sort -
[function]
sort -
[function]
str-split -
[function]
str-reverse -
[function]
str-is-letter -
[function]
str-is-symbol -
[function]
str-is-number -
[function]
str-between -
[function]
chars-at -
[function]
chars-between -
[function]
str-last-index
chars-at
@function chars-at($string, $indices...) { ... }
Description
Extracts the characters at the given indices within a string
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$string
|
Some string |
String
|
— none |
$indices
|
One or more numeric indexes at which the character should be extracted |
Arglist
|
— none |
Returns
List
Throws
Function
chars-atexpects a string for argument$stringbut #{type-of($string)} was given.Function
chars-atexpects a list of numbers for argument$indicesbut #{type-of($index)} was given.
Requires
char-first
(aliased as
str-first
)
@function char-first($string) { ... }
Description
Extracts the first character from a string
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$string
|
Some string |
String
|
— none |
Returns
String
Throws
Cannot execute
char-firston non-string#{$string}.
Requires
-
[function]
is-string
Used by
-
[function]
str-first
char-last
(aliased as
str-last
)
@function char-last($string) { ... }
Description
Extracts the last character from a string
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$string
|
Some string |
String
|
— none |
Returns
String
Throws
Cannot execute
char-laston non-string#{$string}.
Requires
-
[function]
is-string
Used by
-
[function]
str-last
chars-between
@function chars-between($string, $first, $last, $inclusive: true) { ... }
Description
Counts the number of characters between two characters within a string, optionally passing occurrence index
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$string
|
Some string to be indexed |
String
|
— none |
$first
|
The first character to look for, optionally passed as a list where second item indicates occurrence index |
String</code> or <code>List
|
— none |
$last
|
The last character to look for, optionally passed as a list where second item indicates occurrence index |
String</code> or <code>List
|
— none |
$inclusive
|
Whether or not the |
Boolean
|
|
Returns
Number
— The number of characters between $first and $last or 0 if no occurrence of $last follows $first
Throws
Function
char-count-betweenexpects a string for argument$stringbut #{type-of($string)} was given.Function
char-count-betweenexpects a string or list for argument$firstbut #{type-of($first)} was given.Function
char-count-betweenexpects a string or list for argument$lastbut #{type-of($last)} was given.Function
char-count-betweenexpectstrueorfalsefor argument$inclusivebut #{$inclusive} was given.Function
char-count-betweenonly permits one character for arguments$firstand$last.Function
char-count-betweenexpects first argument in list$firstto be a string but #{type-of(first($first))} given.Function
char-count-betweenexpects last argument in list$firstto be a number but #{type-of(last($first))} given.Function
char-count-betweenexpects first argument in list$lastto be a string but #{type-of(first($last))} given.Function
char-count-betweenexpects last argument in list$lastto be a number but #{type-of(last($last))} given.
Requires
char-count
@function char-count($string) { ... }
Description
Counts the number of characters in a string
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$string
|
Some string to be counted |
String
|
— none |
Returns
Number
Throws
Cannot execute
char-counton non-string#{$string}.
Requires
-
[function]
is-string
str-word-count
@function str-word-count($string) { ... }
Description
Counts the number of words in a string
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$string
|
Some string to be counted |
String
|
— none |
Returns
Number
Throws
Cannot execute
str-word-counton non-string#{$string}.
Requires
str-first
(alias for char-first)
@function str-first($string) { ... }
Refer to char-first.
str-last
(alias for char-last)
@function str-last($string) { ... }
Refer to char-last.
str-tail
@function str-tail($string) { ... }
Description
Retrieves all characters in a string except for the first
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$string
|
Some string |
String
|
— none |
Returns
String
Throws
Cannot execute
str-tailon non-string#{$string}.
Requires
-
[function]
is-string
Used by
-
[function]
str-is-number -
[function]
to-upper-case-first -
[function]
to-lower-case-first -
[function]
to-capitalize -
[function]
to-title-case
str-head
@function str-head($string) { ... }
Description
Retrieves all characters in a string except for the last
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$string
|
Some string |
String
|
— none |
Returns
String
Throws
Cannot execute
str-headon non-string#{$string}.
Requires
-
[function]
is-string
str-last-index
@function str-last-index($string, $needle) { ... }
Description
Looks up the last index of a string within the given string
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$string
|
Some string to be searched on |
String
|
— none |
$needle
|
Some string to be searched for |
String
|
— none |
Returns
String or Null
Throws
Function
str-last-indexexpects a string for argument$stringbut #{type-of($string)} was given.Function
str-last-indexexpects a string for argument$needlebut #{type-of($needle)} was given.
Requires
str-pad
@function str-pad($string, $length: str-length($string) + 1, $filler: ' ', $direction: left) { ... }
Description
Pads a string on the given direction with the $filler until preferred $length is reached
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$string
|
Some string to be padded |
String
|
— none |
$length
|
The preferred length of the string |
String
|
|
$filler
|
The string to used as the filler |
String
|
|
$direction
|
The direction to add the padding |
String
|
|
Returns
String
Throws
Function
str-padexpects a string for argument$stringbut #{type-of($string)} was given.Function
str-padexpects a string for argument$fillerbut #{type-of($filler)} was given.Function
str-padexpects a number for argument$lengthbut #{type-of($length)} was given.Function
str-padexpectsleftorrightfor argument$directionbut #{($direction)} was given.
Requires
str-shuffle
@function str-shuffle($string) { ... }
Description
Shuffle all characters within a string
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$string
|
Some string to be shuffled |
String
|
— none |
Returns
String
Throws
Cannot execute
str-shuffleon non-string#{$string}.
Requires
to-upper-case-first
@function to-upper-case-first($string) { ... }
Description
Capitalizes the first letter in a string
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$string
|
Some string |
String
|
— none |
Returns
String
Throws
Cannot execute
to-upper-case-firston non-string#{$string}.
Requires
to-lower-case-first
@function to-lower-case-first($string) { ... }
Description
Lowercases the first letter in a string
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$string
|
Some string |
String
|
— none |
Returns
String
Throws
Cannot execute
to-lower-case-firston non-string#{$string}.
Requires
to-capitalize
@function to-capitalize($string) { ... }
Description
Capitalizes the first letter of each word in a string
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$string
|
Some string |
String
|
— none |
Returns
String
Throws
Cannot execute
to-capitalizeon non-string#{$string}.
Requires
to-title-case
@function to-title-case($string) { ... }
Description
Titlecases a string, ignoring words in $brandy-title-blacklist
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$string
|
Some string |
String
|
— none |
Returns
String
Throws
Cannot execute
to-title-caseon non-string#{$string}.
Requires
Testing
mixins
test
@mixin test($function, $tests, $arglist) { ... }
Description
Enables unit testing of Sass functions
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$function
|
The name of some function to be tested |
String
|
— none |
$tests
|
One or more tests to be run |
Map
|
— none |
$arglist
|
Whether the arguments passed into the test are in the form of an |
Boolean
|
— none |
Requires
-
[function]
cast-string
compare
@mixin compare($variable, $tests, $comp) { ... }
Description
Enables comparative testing of Sass variables
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$variable
|
The name of some function to be tested |
String
|
— none |
$tests
|
One or more tests to be run |
Map
|
— none |
$comp
|
The name of comparative function to use for comparison |
String
|
— none |
Requires
-
[function]
cast-string
Types
functions
is-null
@function is-null($value) { ... }
Description
Determines whether some value is of type null
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$value
|
Some value |
Mixed
|
— none |
Returns
Boolean
Used by
-
[mixin]
position -
[mixin]
position-y -
[mixin]
position-x -
[function]
joins -
[function]
sum -
[function]
avg -
[function]
map-deep-set -
[function]
log -
[function]
ratio -
[function]
fraction -
[function]
build-media -
[function]
str-replace -
[function]
str-split -
[function]
str-trim -
[function]
str-trim-right -
[function]
str-trim-left -
[function]
str-is-number -
[function]
str-between -
[function]
chars-between
is-boolean
(aliased as
is-bool
)
@function is-boolean($value) { ... }
Description
Determines whether some value is of type bool
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$value
|
Some value |
Mixed
|
— none |
Returns
Boolean
Used by
-
[function]
cast-boolean -
[function]
aeq -
[function]
map-extend
is-bool
(alias for is-boolean)
@function is-bool($value) { ... }
Refer to is-boolean.
is-map
@function is-map($value) { ... }
Description
Determines whether some value is of type map
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$value
|
Some value |
Mixed
|
— none |
Returns
Boolean
Used by
-
[function]
cast-map -
[function]
aeq -
[function]
map-deep-get -
[function]
map-deep-set -
[function]
map-depth -
[function]
map-has-keys -
[function]
map-extend -
[function]
map-set -
[function]
map-flatten -
[function]
is-sprite
is-number
@function is-number($value) { ... }
Description
Determines whether some value is of type number
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$value
|
Some value |
Mixed
|
— none |
Returns
Boolean
Used by
-
[function]
cast-boolean -
[function]
cast-number -
[function]
cmyk -
[function]
hsv -
[function]
hsb -
[function]
color-stops -
[function]
color-tints -
[function]
color-shades -
[function]
color-tones -
[mixin]
n-stripes -
[function]
aeq -
[mixin]
google-font -
[mixin]
scale-font -
[mixin]
position -
[mixin]
position-y -
[mixin]
position-x -
[function]
insert-nth -
[function]
replace-nth -
[function]
remove-nth -
[function]
slice -
[function]
shift-index -
[function]
chunk -
[function]
range -
[function]
range-min-max -
[function]
sum -
[function]
avg -
[function]
sort -
[function]
flatten -
[function]
unitless-rad -
[function]
matrix -
[function]
matrix-from -
[function]
matrix-get-row -
[function]
matrix-get-column -
[function]
matrix-swap-rows -
[function]
matrix-swap-columns -
[function]
matrix-replace-row -
[function]
matrix-replace-column -
[function]
are-coords -
[function]
convert-unit -
[function]
strip-unit -
[function]
is-negative -
[function]
is-positive -
[function]
is-zero -
[function]
extract-unit -
[function]
is-percentage -
[function]
is-even -
[function]
is-odd -
[function]
is-integer -
[function]
is-float -
[function]
is-angle -
[function]
is-frequency -
[function]
is-relative-length -
[function]
is-absolute-length -
[function]
is-resolution -
[function]
is-time -
[function]
is-NaN -
[function]
inverse -
[function]
px -
[function]
pt -
[function]
pt -
[function]
pc -
[function]
in -
[function]
mm -
[function]
cm -
[function]
deg -
[function]
rad -
[function]
grad -
[function]
turn -
[function]
dpi -
[function]
dpcm -
[function]
dppx -
[function]
ms -
[function]
s -
[function]
hz -
[function]
khz -
[function]
rem -
[function]
em -
[function]
ex -
[function]
ch -
[function]
vw -
[function]
vh -
[function]
vmin -
[function]
vmax -
[function]
decimal-round -
[function]
decimal-ceil -
[function]
decimal-floor -
[function]
ratio -
[function]
fraction -
[function]
fraction -
[function]
fraction -
[function]
numeric-scale -
[function]
clamp -
[function]
build-media -
[mixin]
triangle -
[mixin]
chevron -
[mixin]
circle -
[mixin]
square -
[function]
sprite -
[function]
sprite-set-spacing -
[function]
sprite-set-width -
[function]
sprite-set-height -
[function]
sprite-set-size -
[function]
str-between -
[function]
char-at -
[function]
chars-at -
[function]
chars-between -
[function]
str-pad -
[function]
is-sprite
is-color
@function is-color($value) { ... }
Description
Determines whether some value is of type color
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$value
|
Some value |
Mixed
|
— none |
Returns
Boolean
Used by
-
[function]
brightness -
[function]
luminance -
[function]
contrast-ratio -
[function]
color-contrast -
[function]
to-hex -
[function]
to-rgb -
[function]
to-hsv -
[function]
to-hsb -
[function]
to-hsl -
[function]
tint -
[function]
shade -
[function]
tone -
[function]
color-complementary -
[function]
color-triad -
[function]
color-analogous -
[function]
color-split-complementary -
[function]
color-rectangle -
[function]
color-square -
[function]
color-stops -
[function]
color-tints -
[function]
color-shades -
[function]
color-tones -
[mixin]
stripes -
[mixin]
n-stripes -
[mixin]
burger-to-close -
[mixin]
triangle -
[mixin]
chevron -
[mixin]
circle -
[mixin]
square
is-list
@function is-list($value) { ... }
Description
Determines whether some value is of type list
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$value
|
Some value |
Mixed
|
— none |
Returns
Boolean
Used by
-
[function]
cast-list -
[function]
cast-map -
[mixin]
stripes -
[mixin]
n-stripes -
[function]
aeq -
[function]
font-source -
[mixin]
google-font -
[function]
first -
[function]
last -
[function]
last-index -
[function]
prepend -
[function]
insert-nth -
[function]
replace -
[function]
replace-nth -
[function]
remove -
[function]
remove-nth -
[function]
slice -
[function]
reverse -
[function]
shuffle -
[function]
glue -
[function]
shift-index -
[function]
contains -
[function]
starts-with -
[function]
ends-with -
[function]
chunk -
[function]
count -
[function]
every -
[function]
some -
[function]
is-empty -
[function]
is-multiple -
[function]
is-single -
[function]
unique -
[function]
is-truthy -
[function]
is-falsy -
[function]
intersection -
[function]
is-symmetrical -
[function]
scrub -
[function]
chance -
[function]
stringify -
[function]
unstringify -
[function]
joins -
[function]
sum -
[function]
avg -
[function]
sort -
[function]
walk -
[function]
head -
[function]
tail -
[function]
flatten -
[function]
map-has-keys -
[function]
map-combine -
[function]
map-extend -
[function]
map-set -
[function]
matrix-from -
[function]
matrix-set-diagonal -
[function]
matrix-set-row -
[function]
matrix-set-column -
[function]
matrix-replace-row -
[function]
matrix-replace-column -
[function]
are-coords -
[function]
build-media -
[function]
selector -
[function]
sprite -
[function]
sprite-set-size -
[function]
str-trim -
[function]
str-trim-right -
[function]
str-trim-left -
[function]
str-between -
[function]
chars-between -
[function]
is-matrix
is-arglist
@function is-arglist($value) { ... }
Description
Determines whether some value is of type arglist
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$value
|
Some value |
Mixed
|
— none |
Returns
Boolean
Used by
-
[function]
cast-map -
[mixin]
stripes -
[mixin]
n-stripes -
[function]
aeq -
[function]
first -
[function]
last -
[function]
last-index -
[function]
prepend -
[function]
insert-nth -
[function]
replace -
[function]
replace-nth -
[function]
remove -
[function]
remove-nth -
[function]
slice -
[function]
reverse -
[function]
shuffle -
[function]
glue -
[function]
shift-index -
[function]
contains -
[function]
starts-with -
[function]
ends-with -
[function]
chunk -
[function]
count -
[function]
count -
[function]
every -
[function]
some -
[function]
is-empty -
[function]
is-multiple -
[function]
is-single -
[function]
unique -
[function]
is-truthy -
[function]
is-falsy -
[function]
intersection -
[function]
is-symmetrical -
[function]
scrub -
[function]
chance -
[function]
stringify -
[function]
unstringify -
[function]
joins -
[function]
sum -
[function]
avg -
[function]
sort -
[function]
walk -
[function]
head -
[function]
tail -
[function]
flatten -
[function]
selector
is-string
@function is-string($value) { ... }
Description
Determines whether some value is of type string
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$value
|
Some value |
Mixed
|
— none |
Returns
Boolean
Used by
-
[function]
cast-string -
[function]
cast-number -
[mixin]
stripes -
[mixin]
n-stripes -
[function]
aeq -
[function]
font-source -
[function]
glue -
[function]
every -
[function]
some -
[function]
range-min-max -
[function]
range-alpha -
[function]
range-alpha-min-max -
[function]
unstringify -
[function]
sum -
[function]
avg -
[function]
walk -
[function]
map-deep-set -
[function]
map-flatten -
[function]
unitless-rad -
[function]
matrix-replace-row -
[function]
matrix-replace-column -
[function]
convert-unit -
[function]
strip-unit -
[function]
is-negative -
[function]
is-positive -
[function]
is-zero -
[function]
extract-unit -
[function]
is-percentage -
[function]
is-even -
[function]
is-odd -
[function]
is-integer -
[function]
is-float -
[function]
is-angle -
[function]
is-frequency -
[function]
is-relative-length -
[function]
is-absolute-length -
[function]
is-resolution -
[function]
is-time -
[function]
inverse -
[function]
px -
[function]
pt -
[function]
pc -
[function]
in -
[function]
mm -
[function]
cm -
[function]
deg -
[function]
rad -
[function]
grad -
[function]
turn -
[function]
dpi -
[function]
dpcm -
[function]
dppx -
[function]
ms -
[function]
s -
[function]
hz -
[function]
khz -
[function]
rem -
[function]
em -
[function]
ex -
[function]
ch -
[function]
vw -
[function]
vh -
[function]
vmin -
[function]
vmax -
[function]
decimal-round -
[function]
decimal-ceil -
[function]
decimal-floor -
[function]
ratio -
[function]
fraction -
[function]
fraction -
[function]
selector -
[function]
sprite -
[function]
sprite-set-url -
[mixin]
sprite-image -
[function]
str-replace -
[function]
str-split -
[function]
str-trim -
[function]
str-trim-right -
[function]
str-trim-left -
[function]
str-contains -
[function]
str-starts-with -
[function]
str-ends-with -
[function]
str-reverse -
[function]
str-is-palindrome -
[function]
str-is-letter -
[function]
str-is-symbol -
[function]
str-is-unit -
[function]
str-is-number -
[function]
str-between -
[function]
char-at -
[function]
chars-at -
[function]
char-first -
[function]
char-last -
[function]
chars-between -
[function]
char-count -
[function]
str-word-count -
[function]
str-word-count -
[function]
str-first -
[function]
str-last -
[function]
str-tail -
[function]
str-head -
[function]
str-last-index -
[function]
str-pad -
[function]
str-shuffle -
[function]
to-upper-case-first -
[function]
to-lower-case-first -
[function]
to-capitalize -
[function]
to-title-case -
[function]
is-sprite -
[mixin]
add-buttons -
[mixin]
remove-buttons -
[mixin]
add-text-inputs -
[mixin]
remove-text-inputs -
[mixin]
add-list-inputs -
[mixin]
remove-list-inputs -
[mixin]
add-file-inputs -
[mixin]
remove-file-inputs -
[mixin]
add-toggle-inputs -
[mixin]
remove-toggle-inputs -
[mixin]
add-headings -
[mixin]
remove-toggle-inputs
is-matrix
@function is-matrix($value) { ... }
Description
Determines whether some value resembles a matrix
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$value
|
Some value |
Mixed
|
— none |
Returns
Boolean
Requires
-
[function]
is-list
Used by
-
[function]
aeq -
[function]
matrix-rows -
[function]
matrix-columns -
[function]
matrix-size -
[function]
matrix-has-coords -
[function]
matrix-set -
[function]
matrix-set-diagonal -
[function]
matrix-set-row -
[function]
matrix-set-column -
[function]
matrix-get -
[function]
matrix-get-diagonal -
[function]
matrix-get-row -
[function]
matrix-get-column -
[function]
matrix-coords -
[function]
matrix-has-value -
[function]
matrix-swap -
[function]
matrix-swap-values -
[function]
matrix-swap-rows -
[function]
matrix-swap-columns -
[function]
matrix-replace -
[function]
matrix-replace-row -
[function]
matrix-replace-column -
[function]
matrix-shuffle -
[function]
matrix-is-square -
[function]
matrix-is-diagonal -
[function]
matrix-is-upper-triangular -
[function]
matrix-is-lower-triangular -
[function]
matrix-print -
[mixin]
matrix-print -
[function]
is-sprite
is-sprite
@function is-sprite($value) { ... }
Description
Determines whether some value resembles a sprite
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$value
|
Some value |
Mixed
|
— none |
Returns
Boolean
Requires
-
[function]
is-map -
[function]
map-has-keys -
[function]
is-string -
[function]
is-number -
[function]
is-matrix
Used by
-
[function]
sprite-url -
[function]
sprite-set-url -
[function]
sprite-spacing -
[function]
sprite-set-spacing -
[function]
sprite-width -
[function]
sprite-set-width -
[function]
sprite-height -
[function]
sprite-set-height -
[function]
sprite-size -
[function]
sprite-set-size -
[function]
sprite-position -
[mixin]
sprite-image
is-position
@function is-position($value) { ... }
Description
Determines whether some value is a position
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$value
|
Some value |
Mixed
|
— none |
Returns
Boolean
Requires
-
[function]
is-length -
[function]
is-percentage -
[function]
contains
Utilities
mixins
add-buttons
@mixin add-buttons($selectors...) { ... }
Description
Adds one or more new button selectors to the global selector variable $all-buttons
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$selectors
|
A list of string selectors |
Arglist
|
— none |
Throws
Function
add-buttonsexpects selectors to be a string but#{$selector}was given.
Requires
remove-buttons
@mixin remove-buttons($selectors...) { ... }
Description
Removes one or more button selectors from the global selector variable $all-buttons
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$selectors
|
A list of string selectors |
Arglist
|
— none |
Throws
Function
remove-buttonsexpects selectors to be a string but#{$selector}was given.
Requires
add-text-inputs
@mixin add-text-inputs($selectors...) { ... }
Description
Adds one or more new text input selectors to the global selector variable $all-text-inputs
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$selectors
|
A list of string selectors |
Arglist
|
— none |
Throws
Function
add-text-inputsexpects selectors to be a string but#{$selector}was given.
Requires
remove-text-inputs
@mixin remove-text-inputs($selectors...) { ... }
Description
Removes one or more text input selectors from the global selector variable $all-text-inputs
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$selectors
|
A list of string selectors |
Arglist
|
— none |
Throws
Function
remove-text-inputsexpects selectors to be a string but#{$selector}was given.
Requires
add-list-inputs
@mixin add-list-inputs($selectors...) { ... }
Description
Adds one or more new list input selectors to the global selector variable $all-list-inputs
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$selectors
|
A list of string selectors |
Arglist
|
— none |
Throws
Function
add-list-inputsexpects selectors to be a string but#{$selector}was given.
Requires
remove-list-inputs
@mixin remove-list-inputs($selectors...) { ... }
Description
Removes one or more list input selectors from the global selector variable $all-list-inputs
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$selectors
|
A list of string selectors |
Arglist
|
— none |
Throws
Function
remove-list-inputsexpects selectors to be a string but#{$selector}was given.
Requires
add-file-inputs
@mixin add-file-inputs($selectors...) { ... }
Description
Adds one or more new file input selectors to the global selector variable $all-file-inputs
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$selectors
|
A list of string selectors |
Arglist
|
— none |
Throws
Function
add-file-inputsexpects selectors to be a string but#{$selector}was given.
Requires
remove-file-inputs
@mixin remove-file-inputs($selectors...) { ... }
Description
Removes one or more file input selectors from the global selector variable $all-file-inputs
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$selectors
|
A list of string selectors |
Arglist
|
— none |
Throws
Function
remove-file-inputsexpects selectors to be a string but#{$selector}was given.
Requires
add-toggle-inputs
@mixin add-toggle-inputs($selectors...) { ... }
Description
Adds one or more new toggle input selectors to the global selector variable $all-toggle-inputs
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$selectors
|
A list of string selectors |
Arglist
|
— none |
Throws
Function
add-toggle-inputsexpects selectors to be a string but#{$selector}was given.
Requires
remove-toggle-inputs
@mixin remove-toggle-inputs($selectors...) { ... }
Description
Removes one or more toggle input selectors from the global selector variable $all-toggle-inputs
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$selectors
|
A list of string selectors |
Arglist
|
— none |
Throws
Function
remove-toggle-inputsexpects selectors to be a string but#{$selector}was given.
Requires
add-headings
@mixin add-headings($selectors...) { ... }
Description
Adds one or more new heading selectors to the global selector variable $all-headings
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$selectors
|
A list of string selectors |
Arglist
|
— none |
Throws
Function
add-headingsexpects selectors to be a string but#{$selector}was given.
Requires
remove-toggle-inputs
@mixin remove-toggle-inputs($selectors...) { ... }
Description
Removes one or more heading selectors from the global selector variable $all-headings
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$selectors
|
A list of string selectors |
Arglist
|
— none |
Throws
Function
remove-headingsexpects selectors to be a string but#{$selector}was given.
Requires
General
functions
opposite-direction
@function opposite-direction($directions...) { ... }
Description
Inverts one or more directions
Parameters
| parameter Name | parameter Description | parameter Type | parameter Default value |
|---|---|---|---|
$directions
|
Directions to be inverted |
Arglist
|
— none |
Returns
String or List
Throws
No opposite direction found for
#{$direction}.